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.
This commit is contained in:
Marc Bernard 2025-04-23 20:26:02 +00:00
parent 3f673ebe8c
commit fa9ef9f3da

View File

@ -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.