May 2019
Beginner to intermediate
548 pages
12h 39m
English
Unlike classic exceptions, class-based exceptions are not a part of the method call. This is partly due to the separation between CX_STATIC_CHECK, CX_DYNAMIC_CHECK, and CX_NO_CHECK—not all of them are required to be handled every time. Similar to other object-oriented languages with the exception mechanism, class-based exceptions are caught with the TRY-CATCH block. In ABAP, however, the aforementioned block is further enhanced with several optional context-control statements, shown in the following code snippet:
TRY. ...execute standard program flow here...CATCH [BEFORE UNWIND] some_exception another_exception [INTO oref]. ...react to the exception here...[CLEANUP [INTO oref].] ...cleanup here before passing the exception...ENDTRY. ...
Read now
Unlock full access