FINALLY blocks and STOP-AFTER
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
If STOP is raised because of a STOP-AFTER phrase, a
FINALLY block still runs, just like for any other
STOP-AFTER condition.
If a STOP-AFTER phrase is in effect, but has not
timed out, the time it takes to run any FINALLY blocks
is incorporated into the time elapsed, as with any other code. However, if the FINALLY block is executing when the time elapses, this does
not raise a STOP condition. The FINALLY block, and any sub-blocks or routines that it executes, run to
completion. When the FINALLY block completes, if the
associated block is the block containing the STOP-AFTER
phrase, whose time has elapsed, the STOP condition is
not raised for that block, since the block is already over. However, if the STOP-AFTER phrase is on an outer block, it is still in
effect when the FINALLY block completes. So now that
the time has elapsed, the STOP condition is raised
If a STOP-AFTER phrase is used in the FINALLY block
itself or in any sub-block, procedure, method, user-defined function, or property
accessor called from the FINALLY block, it is ignored.