UNCAUGHT_EXCEPTION

medium

Class-Based Exception Was Not Caught by Any Handler

Module: ABAP OO

What this means

UNCAUGHT_EXCEPTION is the modern OO equivalent of RAISE_EXCEPTION. It fires when a class-based exception (inheriting from CX_ROOT) propagates up the entire call stack without being caught by a TRY/CATCH block. This can happen when: a method raises a subclass exception that the caller only catches the parent class of, but an unchecked subclass slips through; a constructor raises an exception and the instantiation is not wrapped in TRY; or middleware or framework code raises an exception that the application layer does not expect. ST22 will show the exception class name, which uniquely identifies the failure type.

Recommended Fix

Check ST22 for the exception class (e.g., CX_SY_OPEN_SQL_DB, CX_SY_REF_IS_INITIAL). The exception class name tells you exactly what happened — look it up in SE24. Add TRY/CATCH for the specific exception class at the appropriate level. Use CATCH ... INTO lx_exc to access the exception object and its GET_TEXT( ) method for context. Avoid over-broad CATCH CX_ROOT — catch the most specific class you can.

Quick Info

ModuleABAP OO
Severitymedium
Diagnose in
ST22SE24