Try OpenEdge Now
skip to main content
Error Handling
ABL Block Essentials : Block types : End blocks
 

End blocks

An end block is a block that defines end-of-block processing for the block that encloses it. End blocks are always part of another block and that block is called the associated block. Ends blocks must appear in the associated block after the last executable statement and before the END statement. The end blocks are:
*CATCH
*FINALLY
Here are some important points about end blocks:
*The CATCH block defines a custom error handling block and is strictly a feature of the structured error handling model.
*The FINALLY block contains code that must be executed at the conclusion of the block (or block iteration) whether the associated block completed successfully or raised error. The FINALLY block is an important feature for structured error handling, but it can be just as useful with traditional error handling. Using FINALLY blocks with traditional error handling does not alter the behavior of the traditional error handling model.
*If used, the FINALLY block must be the last end block.