From c2c221b108bcf3d39561d8158b1546af811314aa Mon Sep 17 00:00:00 2001 From: Marc Bernard Date: Tue, 29 Jul 2025 21:33:52 +0000 Subject: [PATCH 1/3] Switch to /apmg/ namespace --- .abapgit.xml | 2 +- src/#apmg#.nspc.xml | 16 ++++++++++++++++ ...rror.clas.abap => #apmg#cx_error.clas.abap} | 18 +++++++++--------- ...bap => #apmg#cx_error.clas.locals_imp.abap} | 0 ..._error.clas.xml => #apmg#cx_error.clas.xml} | 2 +- ...clas.abap => #apmg#cx_error_prev.clas.abap} | 6 +++--- ... #apmg#cx_error_prev.clas.testclasses.abap} | 4 ++-- ...v.clas.xml => #apmg#cx_error_prev.clas.xml} | 9 +-------- ...clas.abap => #apmg#cx_error_t100.clas.abap} | 6 +++--- ... #apmg#cx_error_t100.clas.testclasses.abap} | 4 ++-- ...0.clas.xml => #apmg#cx_error_t100.clas.xml} | 9 +-------- ...clas.abap => #apmg#cx_error_text.clas.abap} | 6 +++--- ... #apmg#cx_error_text.clas.testclasses.abap} | 4 ++-- ...t.clas.xml => #apmg#cx_error_text.clas.xml} | 9 +-------- 14 files changed, 45 insertions(+), 50 deletions(-) create mode 100644 src/#apmg#.nspc.xml rename src/{zcx_error.clas.abap => #apmg#cx_error.clas.abap} (96%) rename src/{zcx_error.clas.locals_imp.abap => #apmg#cx_error.clas.locals_imp.abap} (100%) rename src/{zcx_error.clas.xml => #apmg#cx_error.clas.xml} (92%) rename src/{zcx_error_prev.clas.abap => #apmg#cx_error_prev.clas.abap} (84%) rename src/{zcx_error_prev.clas.testclasses.abap => #apmg#cx_error_prev.clas.testclasses.abap} (79%) rename src/{zcx_error_prev.clas.xml => #apmg#cx_error_prev.clas.xml} (70%) rename src/{zcx_error_t100.clas.abap => #apmg#cx_error_t100.clas.abap} (91%) rename src/{zcx_error_t100.clas.testclasses.abap => #apmg#cx_error_t100.clas.testclasses.abap} (82%) rename src/{zcx_error_t100.clas.xml => #apmg#cx_error_t100.clas.xml} (70%) rename src/{zcx_error_text.clas.abap => #apmg#cx_error_text.clas.abap} (85%) rename src/{zcx_error_text.clas.testclasses.abap => #apmg#cx_error_text.clas.testclasses.abap} (76%) rename src/{zcx_error_text.clas.xml => #apmg#cx_error_text.clas.xml} (70%) diff --git a/.abapgit.xml b/.abapgit.xml index 08ef542..62007b1 100644 --- a/.abapgit.xml +++ b/.abapgit.xml @@ -12,7 +12,7 @@ 750 - ZCX_ERROR=>C_VERSION + /APMG/CX_ERROR=>C_VERSION diff --git a/src/#apmg#.nspc.xml b/src/#apmg#.nspc.xml new file mode 100644 index 0000000..5ecb4d0 --- /dev/null +++ b/src/#apmg#.nspc.xml @@ -0,0 +1,16 @@ + + + + + + /APMG/ + 41813564412598342476 + + + E + apm + apm.to Inc. + + + + diff --git a/src/zcx_error.clas.abap b/src/#apmg#cx_error.clas.abap similarity index 96% rename from src/zcx_error.clas.abap rename to src/#apmg#cx_error.clas.abap index 0f4df2b..7e11060 100644 --- a/src/zcx_error.clas.abap +++ b/src/#apmg#cx_error.clas.abap @@ -1,4 +1,4 @@ -CLASS zcx_error DEFINITION +CLASS /apmg/cx_error DEFINITION PUBLIC INHERITING FROM cx_static_check CREATE PUBLIC. @@ -46,14 +46,14 @@ CLASS zcx_error DEFINITION "! @parameter text | Text "! @parameter previous | Previous exception "! @parameter longtext | Longtext - "! @raising zcx_error | Exception + "! @raising /apmg/cx_error | Exception CLASS-METHODS raise IMPORTING !text TYPE clike !previous TYPE REF TO cx_root OPTIONAL !longtext TYPE csequence OPTIONAL RAISING - zcx_error. + /apmg/cx_error. "! Raise exception with T100 message "!

@@ -67,7 +67,7 @@ CLASS zcx_error DEFINITION "! @parameter msgv4 | Message variable 4 "! @parameter previous | Previous exception "! @parameter longtext | Longtext - "! @raising zcx_error | Exception + "! @raising /apmg/cx_error | Exception CLASS-METHODS raise_t100 IMPORTING msgid TYPE symsgid DEFAULT sy-msgid @@ -79,18 +79,18 @@ CLASS zcx_error DEFINITION !previous TYPE REF TO cx_root OPTIONAL !longtext TYPE csequence OPTIONAL RAISING - zcx_error. + /apmg/cx_error. "! Raise with text from previous exception "! @parameter previous | Previous exception "! @parameter longtext | Longtext - "! @raising zcx_error | Exception + "! @raising /apmg/cx_error | Exception CLASS-METHODS raise_with_text IMPORTING !previous TYPE REF TO cx_root !longtext TYPE csequence OPTIONAL RAISING - zcx_error. + /apmg/cx_error. METHODS get_source_position REDEFINITION. METHODS if_message~get_longtext REDEFINITION. @@ -110,7 +110,7 @@ ENDCLASS. -CLASS zcx_error IMPLEMENTATION. +CLASS /apmg/cx_error IMPLEMENTATION. METHOD constructor ##ADT_SUPPRESS_GENERATION. @@ -251,7 +251,7 @@ CLASS zcx_error IMPLEMENTATION. attr4 = 'IF_T100_DYN_MSG~MSGV4' ). ENDIF. - RAISE EXCEPTION TYPE zcx_error + RAISE EXCEPTION TYPE /apmg/cx_error EXPORTING textid = t100_key msgv1 = msgv1 diff --git a/src/zcx_error.clas.locals_imp.abap b/src/#apmg#cx_error.clas.locals_imp.abap similarity index 100% rename from src/zcx_error.clas.locals_imp.abap rename to src/#apmg#cx_error.clas.locals_imp.abap diff --git a/src/zcx_error.clas.xml b/src/#apmg#cx_error.clas.xml similarity index 92% rename from src/zcx_error.clas.xml rename to src/#apmg#cx_error.clas.xml index 3b0a4b8..a7a7d00 100644 --- a/src/zcx_error.clas.xml +++ b/src/#apmg#cx_error.clas.xml @@ -3,7 +3,7 @@ - ZCX_ERROR + /APMG/CX_ERROR E General Error 40 diff --git a/src/zcx_error_prev.clas.abap b/src/#apmg#cx_error_prev.clas.abap similarity index 84% rename from src/zcx_error_prev.clas.abap rename to src/#apmg#cx_error_prev.clas.abap index 1f67bbe..1833aa4 100644 --- a/src/zcx_error_prev.clas.abap +++ b/src/#apmg#cx_error_prev.clas.abap @@ -1,6 +1,6 @@ -CLASS zcx_error_prev DEFINITION +CLASS /apmg/cx_error_prev DEFINITION PUBLIC - INHERITING FROM zcx_error_text + INHERITING FROM /apmg/cx_error_text CREATE PUBLIC. ************************************************************************ @@ -22,7 +22,7 @@ ENDCLASS. -CLASS zcx_error_prev IMPLEMENTATION. +CLASS /apmg/cx_error_prev IMPLEMENTATION. METHOD constructor ##ADT_SUPPRESS_GENERATION. diff --git a/src/zcx_error_prev.clas.testclasses.abap b/src/#apmg#cx_error_prev.clas.testclasses.abap similarity index 79% rename from src/zcx_error_prev.clas.testclasses.abap rename to src/#apmg#cx_error_prev.clas.testclasses.abap index bcfbf4b..592e019 100644 --- a/src/zcx_error_prev.clas.testclasses.abap +++ b/src/#apmg#cx_error_prev.clas.testclasses.abap @@ -15,10 +15,10 @@ CLASS ltcx_error_prev IMPLEMENTATION. TRY. DATA(i) = 1 / 0. CATCH cx_root INTO DATA(previous). - RAISE EXCEPTION TYPE zcx_error_prev EXPORTING previous = previous. + RAISE EXCEPTION TYPE /apmg/cx_error_prev EXPORTING previous = previous. ENDTRY. cl_abap_unit_assert=>fail( ). - CATCH zcx_error INTO DATA(error). + CATCH /apmg/cx_error INTO DATA(error). cl_abap_unit_assert=>assert_equals( act = error->get_text( ) exp = 'Division by zero' ). diff --git a/src/zcx_error_prev.clas.xml b/src/#apmg#cx_error_prev.clas.xml similarity index 70% rename from src/zcx_error_prev.clas.xml rename to src/#apmg#cx_error_prev.clas.xml index d9ca24b..16fee55 100644 --- a/src/zcx_error_prev.clas.xml +++ b/src/#apmg#cx_error_prev.clas.xml @@ -3,7 +3,7 @@ - ZCX_ERROR_PREV + /APMG/CX_ERROR_PREV E Previous Error 40 @@ -13,13 +13,6 @@ X X - - - CONSTRUCTOR - E - CONSTRUCTOR - - diff --git a/src/zcx_error_t100.clas.abap b/src/#apmg#cx_error_t100.clas.abap similarity index 91% rename from src/zcx_error_t100.clas.abap rename to src/#apmg#cx_error_t100.clas.abap index a5cb81d..a389d46 100644 --- a/src/zcx_error_t100.clas.abap +++ b/src/#apmg#cx_error_t100.clas.abap @@ -1,6 +1,6 @@ -CLASS zcx_error_t100 DEFINITION +CLASS /apmg/cx_error_t100 DEFINITION PUBLIC - INHERITING FROM zcx_error + INHERITING FROM /apmg/cx_error CREATE PUBLIC. ************************************************************************ @@ -28,7 +28,7 @@ ENDCLASS. -CLASS zcx_error_t100 IMPLEMENTATION. +CLASS /apmg/cx_error_t100 IMPLEMENTATION. METHOD constructor ##ADT_SUPPRESS_GENERATION. diff --git a/src/zcx_error_t100.clas.testclasses.abap b/src/#apmg#cx_error_t100.clas.testclasses.abap similarity index 82% rename from src/zcx_error_t100.clas.testclasses.abap rename to src/#apmg#cx_error_t100.clas.testclasses.abap index aa3b9f4..3781b76 100644 --- a/src/zcx_error_t100.clas.testclasses.abap +++ b/src/#apmg#cx_error_t100.clas.testclasses.abap @@ -13,9 +13,9 @@ CLASS ltcx_error_t100 IMPLEMENTATION. TRY. MESSAGE i000(oo) WITH 'Hello,' 'World!'. - RAISE EXCEPTION TYPE zcx_error_t100. + RAISE EXCEPTION TYPE /apmg/cx_error_t100. cl_abap_unit_assert=>fail( ). - CATCH zcx_error INTO DATA(lx_error). + CATCH /apmg/cx_error INTO DATA(lx_error). cl_abap_unit_assert=>assert_equals( act = lx_error->get_text( ) exp = 'Hello, World!' ). diff --git a/src/zcx_error_t100.clas.xml b/src/#apmg#cx_error_t100.clas.xml similarity index 70% rename from src/zcx_error_t100.clas.xml rename to src/#apmg#cx_error_t100.clas.xml index 12aba07..4504c1a 100644 --- a/src/zcx_error_t100.clas.xml +++ b/src/#apmg#cx_error_t100.clas.xml @@ -3,7 +3,7 @@ - ZCX_ERROR_T100 + /APMG/CX_ERROR_T100 E Message Error 40 @@ -13,13 +13,6 @@ X X - - - CONSTRUCTOR - E - CONSTRUCTOR - - diff --git a/src/zcx_error_text.clas.abap b/src/#apmg#cx_error_text.clas.abap similarity index 85% rename from src/zcx_error_text.clas.abap rename to src/#apmg#cx_error_text.clas.abap index 5cb3b6c..745ee37 100644 --- a/src/zcx_error_text.clas.abap +++ b/src/#apmg#cx_error_text.clas.abap @@ -1,6 +1,6 @@ -CLASS zcx_error_text DEFINITION +CLASS /apmg/cx_error_text DEFINITION PUBLIC - INHERITING FROM zcx_error_t100 + INHERITING FROM /apmg/cx_error_t100 CREATE PUBLIC. ************************************************************************ @@ -23,7 +23,7 @@ ENDCLASS. -CLASS zcx_error_text IMPLEMENTATION. +CLASS /apmg/cx_error_text IMPLEMENTATION. METHOD constructor ##ADT_SUPPRESS_GENERATION. diff --git a/src/zcx_error_text.clas.testclasses.abap b/src/#apmg#cx_error_text.clas.testclasses.abap similarity index 76% rename from src/zcx_error_text.clas.testclasses.abap rename to src/#apmg#cx_error_text.clas.testclasses.abap index 35363b5..6b96467 100644 --- a/src/zcx_error_text.clas.testclasses.abap +++ b/src/#apmg#cx_error_text.clas.testclasses.abap @@ -12,9 +12,9 @@ CLASS ltcx_error_text IMPLEMENTATION. METHOD test. TRY. - RAISE EXCEPTION TYPE zcx_error_text EXPORTING text = 'Test'. + RAISE EXCEPTION TYPE /apmg/cx_error_text EXPORTING text = 'Test'. cl_abap_unit_assert=>fail( ). - CATCH zcx_error INTO DATA(lx_error). + CATCH /apmg/cx_error INTO DATA(lx_error). cl_abap_unit_assert=>assert_equals( act = lx_error->get_text( ) exp = 'Test' ). diff --git a/src/zcx_error_text.clas.xml b/src/#apmg#cx_error_text.clas.xml similarity index 70% rename from src/zcx_error_text.clas.xml rename to src/#apmg#cx_error_text.clas.xml index 242b2a3..94a811a 100644 --- a/src/zcx_error_text.clas.xml +++ b/src/#apmg#cx_error_text.clas.xml @@ -3,7 +3,7 @@ - ZCX_ERROR_TEXT + /APMG/CX_ERROR_TEXT E Text Error 40 @@ -13,13 +13,6 @@ X X - - - CONSTRUCTOR - E - CONSTRUCTOR - - From 844f248fbe5f127f0ba16287904ee5d8b2a6f24b Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Tue, 29 Jul 2025 17:37:22 -0400 Subject: [PATCH 2/3] Update abaplint.json --- abaplint.json | 73 +++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/abaplint.json b/abaplint.json index b0618ba..fcea96d 100644 --- a/abaplint.json +++ b/abaplint.json @@ -28,7 +28,12 @@ "align_type_expressions": true, "allowed_object_naming": true, "allowed_object_types": { - "allowed": ["CLAS", "DEVC", "INTF"] + "allowed": [ + "CLAS", + "DEVC", + "INTF", + "NSPC" + ] }, "ambiguous_statement": true, "avoid_use": true, @@ -159,41 +164,41 @@ "no_yoda_conditions": true, "nrob_consistency": true, "object_naming": { - "aqbg": "^ZABAPPM", - "aqqu": "^ZABAPPM", - "aqsg": "^ZABAPPM", - "auth": "^ZABAPPM", - "clas": "^ZC(L|X)\\_ERROR", - "cmod": "^ZABAPPM", - "doma": "^ZABAPPM", - "dtel": "^ZABAPPM", - "enho": "^ZABAPPM", - "enhs": "^ZABAPPM", - "enqu": "^EZABAPPM", - "form": "^ZABAPPM", - "fugr": "^ZABAPPM", - "idoc": "^ZABAPPM", + "aqbg": "^Z", + "aqqu": "^Z", + "aqsg": "^Z", + "auth": "^Z", + "clas": "^/APMG/C(L|X)_ERROR", + "cmod": "^Z", + "doma": "^Z", + "dtel": "^Z", + "enho": "^Z", + "enhs": "^Z", + "enqu": "^EZ", + "form": "^Z", + "fugr": "^Z", + "idoc": "^Z", "ignoreNames": [], "ignorePatterns": [], - "intf": "^ZIF\\_ERROR", - "msag": "^ZABAPPM", + "intf": "^/APMG/IF_ERROR", + "msag": "^Z", "patternKind": "required", - "pinf": "^ZABAPPM", - "prog": "^ZABAPPM", - "sfpf": "^ZABAPPM", - "sfpi": "^ZABAPPM", - "shlp": "^ZABAPPM", - "ssfo": "^ZABAPPM", - "ssst": "^ZABAPPM", - "sucu": "^ZABAPPM", - "suso": "^ZABAPPM", - "sxci": "^ZABAPPM", - "tabl": "^ZABAPPM", - "tran": "^ZABAPPM", - "ttyp": "^ZABAPPM", - "wdya": "^ZABAPPM", - "wdyn": "^ZABAPPM", - "xslt": "^ZABAPPM" + "pinf": "^Z", + "prog": "^Z", + "sfpf": "^Z", + "sfpi": "^Z", + "shlp": "^Z", + "ssfo": "^Z", + "ssst": "^Z", + "sucu": "^Z", + "suso": "^Z", + "sxci": "^Z", + "tabl": "^Z", + "tran": "^Z", + "ttyp": "^Z", + "wdya": "^Z", + "wdyn": "^Z", + "xslt": "^Z" }, "obsolete_statement": true, "omit_parameter_name": true, @@ -262,7 +267,7 @@ "xml_consistency": true }, "syntax": { - "errorNamespace": "^(Z|Y|LCL_|TY_|LIF_)", + "errorNamespace": "^(/APMG/|LCL_|TY_|LIF_)", "globalConstants": [], "globalMacros": [], "version": "v750" From fa7366c3e8ef93adcb78c3eac46ae9b6b7fcbbb4 Mon Sep 17 00:00:00 2001 From: Marc Bernard Date: Tue, 29 Jul 2025 21:39:54 +0000 Subject: [PATCH 3/3] Lint --- src/#apmg#cx_error_prev.clas.testclasses.abap | 6 +++--- src/#apmg#cx_error_t100.clas.testclasses.abap | 9 ++++----- src/#apmg#cx_error_text.clas.testclasses.abap | 9 ++++----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/#apmg#cx_error_prev.clas.testclasses.abap b/src/#apmg#cx_error_prev.clas.testclasses.abap index 592e019..603846e 100644 --- a/src/#apmg#cx_error_prev.clas.testclasses.abap +++ b/src/#apmg#cx_error_prev.clas.testclasses.abap @@ -1,4 +1,4 @@ -CLASS ltcx_error_prev DEFINITION FOR TESTING +CLASS ltcl_error_prev DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL. @@ -7,13 +7,13 @@ CLASS ltcx_error_prev DEFINITION FOR TESTING ENDCLASS. -CLASS ltcx_error_prev IMPLEMENTATION. +CLASS ltcl_error_prev IMPLEMENTATION. METHOD test. TRY. TRY. - DATA(i) = 1 / 0. + DATA(i) = 1 / 0 ##NEEDED. CATCH cx_root INTO DATA(previous). RAISE EXCEPTION TYPE /apmg/cx_error_prev EXPORTING previous = previous. ENDTRY. diff --git a/src/#apmg#cx_error_t100.clas.testclasses.abap b/src/#apmg#cx_error_t100.clas.testclasses.abap index 3781b76..86b9bf6 100644 --- a/src/#apmg#cx_error_t100.clas.testclasses.abap +++ b/src/#apmg#cx_error_t100.clas.testclasses.abap @@ -1,4 +1,4 @@ -CLASS ltcx_error_t100 DEFINITION FOR TESTING +CLASS ltcl_error_t100 DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL. @@ -7,17 +7,16 @@ CLASS ltcx_error_t100 DEFINITION FOR TESTING ENDCLASS. -CLASS ltcx_error_t100 IMPLEMENTATION. +CLASS ltcl_error_t100 IMPLEMENTATION. METHOD test. TRY. MESSAGE i000(oo) WITH 'Hello,' 'World!'. RAISE EXCEPTION TYPE /apmg/cx_error_t100. - cl_abap_unit_assert=>fail( ). - CATCH /apmg/cx_error INTO DATA(lx_error). + CATCH /apmg/cx_error INTO DATA(error). cl_abap_unit_assert=>assert_equals( - act = lx_error->get_text( ) + act = error->get_text( ) exp = 'Hello, World!' ). ENDTRY. diff --git a/src/#apmg#cx_error_text.clas.testclasses.abap b/src/#apmg#cx_error_text.clas.testclasses.abap index 6b96467..16e27f2 100644 --- a/src/#apmg#cx_error_text.clas.testclasses.abap +++ b/src/#apmg#cx_error_text.clas.testclasses.abap @@ -1,4 +1,4 @@ -CLASS ltcx_error_text DEFINITION FOR TESTING +CLASS ltcl_error_text DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL. @@ -7,16 +7,15 @@ CLASS ltcx_error_text DEFINITION FOR TESTING ENDCLASS. -CLASS ltcx_error_text IMPLEMENTATION. +CLASS ltcl_error_text IMPLEMENTATION. METHOD test. TRY. RAISE EXCEPTION TYPE /apmg/cx_error_text EXPORTING text = 'Test'. - cl_abap_unit_assert=>fail( ). - CATCH /apmg/cx_error INTO DATA(lx_error). + CATCH /apmg/cx_error INTO DATA(error). cl_abap_unit_assert=>assert_equals( - act = lx_error->get_text( ) + act = error->get_text( ) exp = 'Test' ). ENDTRY.