cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ADT rename exception class bug "Error when replacing ZCL_XXX====CS. Details: parameter previous..."

Sandra_Rossi
Active Contributor
0 Likes
363

In Eclipse 2025-03 / ADT 3.48.3 / backend ABAP 7.58, I'm renaming an exception class, I get this error:

Error when replacing ZCL_XXX====CS. Details: parameter previous end >= next start: [476,52] >= [476.26]

Sandra_Rossi_0-1744461537099.png

The referred code is:

Sandra_Rossi_1-1744461643782.png

    IF sy-subrc <> 0.
      RAISE EXCEPTION NEW zcx_xxxxxxxxxxxxxxxxxxxxxx( iv_texte = 'xxxxxxxxxx'(001) ).
    ENDIF.

No fix found in SAP notes.

Thanks.

Sandra

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Likes

It's a bug.

I resolved by first replacing RAISE EXCEPTION NEW with RAISE EXCEPTION TYPE, and then renaming again.

    IF sy-subrc <> 0.
      RAISE EXCEPTION TYPE zcx_xxxxxxxxxxxxxxxxxxxxxx EXPORTING iv_texte = 'xxxxxxxxxx'(001).
    ENDIF.

Sandra

NB 1: the ABAP Cleaner doesn't help replacing all RAISE EXCEPTION NEW automatically, it's only able to do the opposite (RAISE EXCEPTION TYPE → RAISE EXCEPTION NEW).

NB 2: The replacement of statements can be done in ADT with regex.

For instance, such statements on two lines:

          RAISE EXCEPTION NEW zcx_xxxxxxxxxxxxxxxxxxxxxx(
              iv_texte = 'Any literal'(004) ).

can be replaced with regex

NEW zcx_xxxxxxxxxxxxxxxxxxxxxx\((.*)\r\n(.*) \)\.

TYPE zcx_xxxxxxxxxxxxxxxxxxxxxx EXPORTING\r\n\1 \2.

Sandra_Rossi_1-1744464728302.png

Result:

          RAISE EXCEPTION TYPE zcx_xxxxxxxxxxxxxxxxxxxxxx EXPORTING
               iv_texte = 'Any literal'(004) ).

Answers (0)