mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 04:08:27 +08:00
WDYN: Improve error messages (#4310)
Pass exception text to UI/log Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
46e2dd827b
commit
869c0bccb5
|
@ -78,7 +78,7 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
||||
CLASS zcl_abapgit_object_wdyn IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD add_fm_exception.
|
||||
|
@ -155,6 +155,7 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
METHOD delta_controller.
|
||||
|
||||
DATA: li_controller TYPE REF TO if_wdy_md_controller,
|
||||
lx_error TYPE REF TO cx_wdy_md_exception,
|
||||
lv_found TYPE abap_bool,
|
||||
ls_key TYPE wdy_md_controller_key,
|
||||
ls_obj_new TYPE svrs2_versionable_object,
|
||||
|
@ -182,8 +183,8 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
controller_type = is_controller-definition-controller_type ).
|
||||
li_controller->save_to_database( ).
|
||||
li_controller->unlock( ).
|
||||
CATCH cx_wdy_md_exception.
|
||||
zcx_abapgit_exception=>raise( 'error creating dummy controller' ).
|
||||
CATCH cx_wdy_md_exception INTO lx_error.
|
||||
zcx_abapgit_exception=>raise( |Error creating dummy controller: { lx_error->get_text( ) }| ).
|
||||
ENDTRY.
|
||||
ENDIF.
|
||||
|
||||
|
@ -255,6 +256,7 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
lv_found TYPE abap_bool,
|
||||
ls_obj_new TYPE svrs2_versionable_object,
|
||||
li_component TYPE REF TO if_wdy_md_component,
|
||||
lx_error TYPE REF TO cx_wdy_md_exception,
|
||||
ls_obj_old TYPE svrs2_versionable_object.
|
||||
|
||||
|
||||
|
@ -272,8 +274,8 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
devclass = iv_package ).
|
||||
li_component->save_to_database( ).
|
||||
li_component->unlock( ).
|
||||
CATCH cx_wdy_md_exception.
|
||||
zcx_abapgit_exception=>raise( 'error creating dummy component' ).
|
||||
CATCH cx_wdy_md_exception INTO lx_error.
|
||||
zcx_abapgit_exception=>raise( |Error creating dummy component: { lx_error->get_text( ) }| ).
|
||||
ENDTRY.
|
||||
ENDIF.
|
||||
|
||||
|
@ -312,6 +314,7 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
ls_obj_new TYPE svrs2_versionable_object,
|
||||
ls_obj_old TYPE svrs2_versionable_object,
|
||||
lv_found TYPE abap_bool,
|
||||
lx_error TYPE REF TO cx_wdy_md_exception,
|
||||
li_view TYPE REF TO if_wdy_md_abstract_view.
|
||||
|
||||
FIELD-SYMBOLS: <ls_def> LIKE LINE OF ls_obj_old-wdyv-defin.
|
||||
|
@ -331,8 +334,8 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
type = is_view-definition-type ).
|
||||
li_view->save_to_database( ).
|
||||
li_view->unlock( ).
|
||||
CATCH cx_wdy_md_exception.
|
||||
zcx_abapgit_exception=>raise( 'error creating dummy view' ).
|
||||
CATCH cx_wdy_md_exception INTO lx_error.
|
||||
zcx_abapgit_exception=>raise( |Error creating dummy view: { lx_error->get_text( ) }| ).
|
||||
ENDTRY.
|
||||
ENDIF.
|
||||
|
||||
|
@ -686,6 +689,7 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
|
||||
DATA: ls_key TYPE wdy_controller_key,
|
||||
lv_corrnr TYPE trkorr,
|
||||
lx_error TYPE REF TO cx_wdy_md_exception,
|
||||
ls_delta TYPE svrs2_xversionable_object.
|
||||
|
||||
|
||||
|
@ -700,8 +704,8 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
delta = ls_delta-wdyc
|
||||
CHANGING
|
||||
corrnr = lv_corrnr ).
|
||||
CATCH cx_wdy_md_exception.
|
||||
zcx_abapgit_exception=>raise( 'error recovering version of controller' ).
|
||||
CATCH cx_wdy_md_exception INTO lx_error.
|
||||
zcx_abapgit_exception=>raise( |Error recovering version of controller: { lx_error->get_text( ) }| ).
|
||||
ENDTRY.
|
||||
|
||||
ENDMETHOD.
|
||||
|
@ -711,6 +715,7 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
|
||||
DATA: ls_key TYPE wdy_md_component_key,
|
||||
lv_corrnr TYPE trkorr,
|
||||
lx_error TYPE REF TO cx_wdy_md_exception,
|
||||
ls_delta TYPE svrs2_xversionable_object.
|
||||
|
||||
|
||||
|
@ -727,8 +732,8 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
delta = ls_delta-wdyd
|
||||
CHANGING
|
||||
corrnr = lv_corrnr ).
|
||||
CATCH cx_wdy_md_exception.
|
||||
zcx_abapgit_exception=>raise( 'error recovering version of component' ).
|
||||
CATCH cx_wdy_md_exception INTO lx_error.
|
||||
zcx_abapgit_exception=>raise( |Error recovering version of component: { lx_error->get_text( ) }| ).
|
||||
ENDTRY.
|
||||
|
||||
ENDMETHOD.
|
||||
|
@ -738,6 +743,7 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
|
||||
DATA: ls_key TYPE wdy_md_view_key,
|
||||
lv_corrnr TYPE trkorr,
|
||||
lx_error TYPE REF TO cx_wdy_md_exception,
|
||||
ls_delta TYPE svrs2_xversionable_object.
|
||||
|
||||
|
||||
|
@ -752,8 +758,8 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
delta = ls_delta-wdyv
|
||||
CHANGING
|
||||
corrnr = lv_corrnr ).
|
||||
CATCH cx_wdy_md_exception.
|
||||
zcx_abapgit_exception=>raise( 'error recovering version of abstract view' ).
|
||||
CATCH cx_wdy_md_exception INTO lx_error.
|
||||
zcx_abapgit_exception=>raise( |Error recovering version of abstract view: { lx_error->get_text( ) }| ).
|
||||
ENDTRY.
|
||||
|
||||
ENDMETHOD.
|
||||
|
@ -838,8 +844,7 @@ CLASS ZCL_ABAPGIT_OBJECT_WDYN IMPLEMENTATION.
|
|||
|
||||
SELECT SINGLE component_name FROM wdy_component
|
||||
INTO lv_component_name
|
||||
WHERE component_name = ms_item-obj_name
|
||||
AND version = 'A'. "#EC CI_GENBUFF
|
||||
WHERE component_name = ms_item-obj_name. "#EC CI_GENBUFF
|
||||
rv_bool = boolc( sy-subrc = 0 ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
|
Loading…
Reference in New Issue
Block a user