Get Example source ABAP code based on a different SAP table
ARTICLE
Exceptions - CATCH The example demonstrates the catching of class based exceptions.
ABAP_SOURCE_CODE ABAP_EXEC
ABAP_DESCRIPTION The meth1 method raises a non-resumable exception, the meth2 method raises a resumable exception that is handled in the TRY -control structure of the method main using CATCH.
If handling takes place without BEFORE UNWIND, the CLEANUP block is executed in both cases before handling and the context of the method called is not available during handling.
If handling takes place with BEFORE UNWIND, the context of the method called is available in both cases during handling and the CLEANUP block is executed after the handling.
When a resumable exception is raised, the RESUME statement can be executed during the handling. This statement makes sure that processing in the method called is continued without its CLEANUP block being executed.