mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-02 13:03:01 +08:00
Catch send errors in HTTP client (#4690)
Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
d9f4ee7a54
commit
7bc767312e
|
@ -115,13 +115,22 @@ CLASS zcl_abapgit_http_client IMPLEMENTATION.
|
||||||
lv_code TYPE i,
|
lv_code TYPE i,
|
||||||
lv_message TYPE string.
|
lv_message TYPE string.
|
||||||
|
|
||||||
mi_client->send( ).
|
mi_client->send(
|
||||||
mi_client->receive(
|
|
||||||
EXCEPTIONS
|
EXCEPTIONS
|
||||||
http_communication_failure = 1
|
http_communication_failure = 1
|
||||||
http_invalid_state = 2
|
http_invalid_state = 2
|
||||||
http_processing_failed = 3
|
http_processing_failed = 3
|
||||||
OTHERS = 4 ).
|
http_invalid_timeout = 4
|
||||||
|
OTHERS = 5 ).
|
||||||
|
|
||||||
|
IF sy-subrc = 0.
|
||||||
|
mi_client->receive(
|
||||||
|
EXCEPTIONS
|
||||||
|
http_communication_failure = 1
|
||||||
|
http_invalid_state = 2
|
||||||
|
http_processing_failed = 3
|
||||||
|
OTHERS = 4 ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
IF sy-subrc <> 0.
|
IF sy-subrc <> 0.
|
||||||
" in case of HTTP_COMMUNICATION_FAILURE
|
" in case of HTTP_COMMUNICATION_FAILURE
|
||||||
|
|
Loading…
Reference in New Issue
Block a user