The compile-time startup parameter -undothrow n makes UNDO, THROW the default block-level or routine-level error directive for all files compiled while the 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 a value of 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, this 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 process.