From 6b7e4d62dd6b358954f3a464410a0abce9a7a591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=BCnter?= Date: Sun, 16 Jun 2019 18:01:53 +0200 Subject: [PATCH] Improve error handling for delete_tadir (#2741) * Improve error handling for delete_tadir * add TODO comment for delete tadir --- src/zcl_abapgit_objects.clas.abap | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/zcl_abapgit_objects.clas.abap b/src/zcl_abapgit_objects.clas.abap index 30b23743b..320e0d703 100644 --- a/src/zcl_abapgit_objects.clas.abap +++ b/src/zcl_abapgit_objects.clas.abap @@ -512,7 +512,17 @@ CLASS ZCL_ABAPGIT_OBJECTS IMPLEMENTATION. wi_tadir_pgmid = 'R3TR' wi_tadir_object = is_item-obj_type wi_tadir_obj_name = is_item-obj_name - wi_test_modus = abap_false. + wi_test_modus = abap_false + EXCEPTIONS + OTHERS = 1 ##FM_SUBRC_OK. + + " We deliberately ignore the subrc, because throwing an exception would + " break the deletion of lots of object types. On the other hand we have + " to catch the exceptions because otherwise messages would directly be issued + " by the function module and change the control flow. Thus breaking the + " deletion of TOBJ and other object types. + " TODO: This is not very clean and has to be improved in the future. See PR 2741. + ENDIF. ENDIF.