Default Condition Handling
- Last Updated: October 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
The default for handling conditions in ABL is simple. It is scoped to blocks. Several things
happen when an error occurs, when not explicitly handled by some ABL construct such as
NO-ERROR or CATCH:
- If there is any error message associated with the condition, it is displayed to the current output device. For an application server, the message is written to the application server log.
- The current block is undone. If the condition occurred in an iterating block, it is only the current block iteration that is undone.
- Any statements following the line where the condition occurred are not
executed. Program flow continues based on the default branching option for the block
type.Note: If there is a
FINALLYblock associated with the current block, it still runs even though anERRORorSTOPcondition occurred. For more information see FINALLY Blocks. - For a
STOPcondition,STOPis raised again in the outer block, if there is one, otherwise it is raised in the caller. From there the same actions (1-4) are taken with respect to the new current block.