Avoid Explicitly Raising System Exceptions (CX_SY_*)
WarningSecurity & Robustness#EC RAISE_CX_SYRemote Enabled
Overview
Avoid raising SAP internal system exceptions (cx_sy_*).
ATC Finding Message:
Avoid raising SAP internal system exceptions; use application exceptions
Rationale
CX_SY_* exceptions describe failures detected by the ABAP runtime, such as invalid table access or division by zero. Applications should not fabricate those conditions because callers cannot distinguish them from real runtime faults. Define and raise a custom exception class for application errors instead.
Non-Compliant
abap
RAISE EXCEPTION NEW cx_sy_zerodivide( ).Compliant
abap
RAISE EXCEPTION NEW cx_invalid_amount( ).Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC RAISE_CX_SY
" SAP CI_ prefix format:
... "#EC CI_RAISE_CX_SYTechnical Details
- Native ATC Class:
ZCL_SKYLINT_NO_RAISE_CX_SY - Implementation File: zcl_skylint_no_raise_cx_sy.clas.abap