Try OpenEdge Now
skip to main content
Error Handling
STOP and QUIT Condition Handling : STOP condition handling : Default handling

Default handling

When the STOP condition occurs, by default, the AVM follows these steps:
1. If the STOP condition results from an unrecoverable system error, such as a RUN statement that specifies a non-existent procedure file, the AVM displays an error message to the standard output device, which is usually the terminal screen. The NO-ERROR option does not suppress error messages resulting from a STOP condition.
2. The AVM undoes the current transaction.
3. The AVM looks for an ON STOP phrase. If the AVM finds an ON STOP phrase, it must determine if it is safe to resume execution at this point. In some cases, the AVM might ignore ON STOP phrases at certain levels of the call stack. For example, if the AVM executes a procedure that relies on a lost database connection, the AVM raises the STOP condition and unwinds the call stack until it gets to a level above all references to the lost database. If it encounters an ON STOP before this point it ignores it. If it encounters an ON STOP phrase after this point, then the AVM executes the ON STOP.
4. If the application was started from a tool such as the OpenEdge Editor, it returns to that tool. Otherwise, if you used the Startup Procedure (-p) parameter to start the ABL session, and if the startup procedure is still active, the AVM restarts the startup procedure.
* Example: default handling for lost database connections