HOOK: catch exception (#6937)

This commit is contained in:
Lars Hvam 2024-05-24 13:00:21 +02:00 committed by GitHub
parent 11a7e58237
commit e2c625f2d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -259,10 +259,12 @@ CLASS ZCL_ABAPGIT_OBJECT_ENHO_HOOK IMPLEMENTATION.
* dont call method lo_hook_impl->get_include_bound( ), it might dump * dont call method lo_hook_impl->get_include_bound( ), it might dump
* if the PROG does not exists * if the PROG does not exists
IF ls_original_object-org_main_type = 'PROG' OR ls_original_object-org_main_type = 'REPS'. IF ls_original_object-org_main_type = 'PROG' OR ls_original_object-org_main_type = 'REPS'.
ls_progdir = zcl_abapgit_factory=>get_sap_report( )->read_progdir( ls_original_object-org_main_name ). TRY.
IF sy-subrc = 0 AND ls_progdir-subc = 'I'. ls_progdir = zcl_abapgit_factory=>get_sap_report( )->read_progdir( ls_original_object-org_main_name ).
ls_original_object-include_bound = abap_true. ls_original_object-include_bound = boolc( ls_progdir-subc = 'I' ).
ENDIF. CATCH zcx_abapgit_exception.
ls_original_object-include_bound = abap_false.
ENDTRY.
ENDIF. ENDIF.
lt_enhancements = lo_hook_impl->get_hook_impls( ). lt_enhancements = lo_hook_impl->get_hook_impls( ).