From fa9ef9f3da3c87f4fa07dab9fcb4bda76b31f309 Mon Sep 17 00:00:00 2001 From: Marc Bernard Date: Wed, 23 Apr 2025 20:26:02 +0000 Subject: [PATCH] Fix trigger location for `zcx_abapgit_exception` Closes #7220 Keeping the correct trigger location in attribute `ms_src_info` allows [Debugger Extension for abapGit](https://github.com/Marc-Bernard-Tools/Debugger-Ext-for-abapGit) to show the correct trigger location of `zcx_abapgit_exception=>raise...` calls. See #7220 for a discussion of the issue. --- src/zcx_abapgit_exception.clas.abap | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/zcx_abapgit_exception.clas.abap b/src/zcx_abapgit_exception.clas.abap index a35606974..fb2f22590 100644 --- a/src/zcx_abapgit_exception.clas.abap +++ b/src/zcx_abapgit_exception.clas.abap @@ -32,6 +32,7 @@ CLASS zcx_abapgit_exception DEFINITION DATA mv_longtext TYPE string READ-ONLY. DATA mt_callstack TYPE abap_callstack READ-ONLY. DATA mi_log TYPE REF TO zif_abapgit_log READ-ONLY. + DATA ms_src_info TYPE tpda_sys_srcinfo READ-ONLY. "! Raise exception with text "! @parameter iv_text | Text @@ -99,6 +100,7 @@ CLASS zcx_abapgit_exception DEFINITION REDEFINITION . METHODS if_message~get_longtext REDEFINITION . + PROTECTED SECTION. PRIVATE SECTION. @@ -155,6 +157,13 @@ CLASS zcx_abapgit_exception IMPLEMENTATION. save_callstack( ). + " Save for debugger + get_source_position( + IMPORTING + program_name = ms_src_info-program + include_name = ms_src_info-include + source_line = ms_src_info-line ). + ENDMETHOD.