Try OpenEdge Now
skip to main content
Error Handling
Raising errors with THROW : THROW as a default for blocks : -undothrow n startup parameter
 

-undothrow n startup parameter

The compile-time startup parameter -undothrow n makes UNDO, THROW the default block-level or routine-level error directive for all files compiled while this parameter is in effect. It has the same effect as inserting either BLOCK-LEVEL ON ERROR UNDO, THROW or ROUTINE-LEVEL ON ERROR UNDO, THROW (depending on the value of n) in every source file compiled into r-code.
Caution: Because this parameter potentially affects many files comprising a large volume of source code, be sure that you understand the implications of using it to compile your application.
The argument n is required and must have the value 1 or 2:
*-undothrow 1 — Yields the same result as including ROUTINE-LEVEL ON ERROR UNDO, THROW in every procedure and class file being compiled. See ROUTINE-LEVEL ON ERROR UNDO, THROW statement.
*-undothrow 2 — Yields the same result as including BLOCK-LEVEL ON ERROR UNDO, THROW in every procedure and class file being compiled. If any ROUTINE-LEVEL ON ERROR UNDO, THROW statements occur in the source, the parameter supersedes them. See BLOCK-LEVEL ON ERROR UNDO, THROW statement.
Using this parameter with an argument other than 1 or 2 results in an error and immediate termination of the operation. The parameter is ignored if it is used in a context other than that of a COMPILE statement or an on-the-fly compilation.