Understanding exceptions

Exceptions are abnormal runtime events that can be trapped for control.

If an instruction executes abnormally, the runtime system throws exceptions that can be handled by the program.

Specific exception actions can be taken based on the class of the exception.

Runtime errors (exceptions) can be trapped by a WHENEVER exception handler or by a TRY/CATCH block. Note that some specific errors cannot be trapped.

A Genero exception is identified by its number and has a description. For a complete list of BDL errors, see Genero BDL errors.

Exception handlers are typically used to detect database errors when executing SQL statement. For more details, see SQL execution diagnostics