mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
Merge pull request #941 from christianguenter2/Issue_836
Catch class_not_existing exception #836
This commit is contained in:
commit
87e78a1de3
|
@ -557,7 +557,18 @@ CLASS lcl_oo_class IMPLEMENTATION.
|
||||||
* when the methods are changed
|
* when the methods are changed
|
||||||
* APPEND cl_oo_classname_service=>get_cs_name( lv_class_name ) TO rt_includes.
|
* APPEND cl_oo_classname_service=>get_cs_name( lv_class_name ) TO rt_includes.
|
||||||
|
|
||||||
lt_methods = cl_oo_classname_service=>get_all_method_includes( lv_class_name ).
|
cl_oo_classname_service=>get_all_method_includes(
|
||||||
|
EXPORTING
|
||||||
|
clsname = lv_class_name
|
||||||
|
RECEIVING
|
||||||
|
result = lt_methods
|
||||||
|
EXCEPTIONS
|
||||||
|
class_not_existing = 1 ).
|
||||||
|
|
||||||
|
IF sy-subrc <> 0.
|
||||||
|
lcx_exception=>raise( |Class { lv_class_name } not existing| ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
LOOP AT lt_methods ASSIGNING <ls_method>.
|
LOOP AT lt_methods ASSIGNING <ls_method>.
|
||||||
APPEND <ls_method>-incname TO rt_includes.
|
APPEND <ls_method>-incname TO rt_includes.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
|
@ -65,7 +65,9 @@ INTERFACE lif_oo_object_fnc.
|
||||||
IMPORTING
|
IMPORTING
|
||||||
iv_object_name TYPE sobj_name
|
iv_object_name TYPE sobj_name
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rt_includes) TYPE ty_includes_tt,
|
VALUE(rt_includes) TYPE ty_includes_tt
|
||||||
|
RAISING
|
||||||
|
lcx_exception,
|
||||||
exists
|
exists
|
||||||
IMPORTING
|
IMPORTING
|
||||||
iv_object_name TYPE seoclskey
|
iv_object_name TYPE seoclskey
|
||||||
|
|
Loading…
Reference in New Issue
Block a user