abapOpenChecks - Installation - Checks - Utilities - Links

CHECK_03 - Wrong use of TRY-CATCH

Improve this page
RFC enabled
CODE

TRY without CATCH

Remove TRY block, or implement CATCH case

Example:

TRY.
  lo_obj->method( ).
ENDTRY.

can be reduced to

lo_obj->method( ).

Nesting with same exception

constructs like

               CATCH zcx_error.
             ENDTRY.
           CATCH zcx_error.
         ENDTRY.
       CATCH zcx_error.
     ENDTRY.

can typically be reduced to

       CATCH zcx_error.
     ENDTRY.

Configuration

Configuration