Use this statement in a procedure (.p) or class (.cls) file to change the implicit, default ON ERROR directive from UNDO, RETRY to UNDO, THROW for all routine-level blocks in a file. The statement must come before any executable or DEFINE statements in a file. However, it can come either before or after a USING statement.
ROUTINE-LEVEL ON ERROR UNDO, THROW.
Instead of adding the statement to source-code files, you can use the -undothrow 1 startup parameter to change the default error-handling on routine-level blocks to UNDO, THROW during compilation. See the OpenEdge Deployment: Startup Command and Parameter Reference for more information.
The BLOCK-LEVEL ON ERROR UNDO, THROW statement can be used if you want to change the default error-handling on REPEAT, FOR, and DO TRANSACTION blocks in addition to routine-level blocks. (You can use the -undothrow 2 startup parameter to change the default error-handling to UNDO, THROW on every block affected by the BLOCK-LEVEL statement during compilation.)
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |