Link to this page
Print this page
Parent topic
:
Advanced features
Advanced features
Exceptions
Describes exception (error) handling in the programs.
Understanding exceptions
Exceptions are abnormal runtime events that can be trapped for control.
Exception classes
Exception classes indirectly define the exception type.
Exception actions
Exception actions define the type of action to be taken when an exception occurs.
WHENEVER instruction
Use the
WHENEVER
instruction to define how exceptions must be handled for the rest of the module.
TRY - CATCH block
Use TRY / CATCH blocks to trap runtime exceptions in a delimited code block.
Tracing exceptions
Exception can be logged in a file when using the
STARTLOG()
function.
Default exception handling
By default,
WHENEVER ANY ERROR
action is to
CONTINUE
the program flow.
Non-trappable errors
Some specific Genero runtime errors are not trappable.
Examples