‎2025 Apr 12 1:46 PM - edited ‎2025 Apr 12 2:56 PM
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]
The referred code is:
IF sy-subrc <> 0.
RAISE EXCEPTION NEW zcx_xxxxxxxxxxxxxxxxxxxxxx( iv_texte = 'xxxxxxxxxx'(001) ).
ENDIF.No fix found in SAP notes.
Thanks.
Sandra
Request clarification before answering.
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.
Result:
RAISE EXCEPTION TYPE zcx_xxxxxxxxxxxxxxxxxxxxxx EXPORTING
iv_texte = 'Any literal'(004) ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.