Try OpenEdge Now
skip to main content
Startup Command and Parameter Reference
Startup Parameter Descriptions : UNDO, THROW Error Handling (-undothrow)

UNDO, THROW Error Handling (-undothrow)

Change the default error handling to UNDO, THROW in routine or other blocks.
Operating system and syntax
UNIX / Windows
-undothrow n
Use with
Maximum value
Minimum value
Single-user default
Multi-user default
Client Session
A value (either 1 or 2) that specifies whether you want to change the default error-handling to UNDO,THROW for routine-level blocks only, or for other blocks as well.
Set n to 1 to change the default behavior for routine-level blocks only. Routine-level blocks include the main block of an external procedure (.p), internal procedures, user-defined functions, methods of a class, class constructors, property accessors, and ON blocks used as database triggers with CREATE, DELETE, WRITE or ASSIGN events.
Set n to 2 to change the behavior for REPEAT blocks, FOR blocks, and DO TRANSACTION blocks in addition to all of the routine-level blocks.
Any value other than 1 or 2 will throw an error and terminate the session.
Note: The -undothrow startup parameter has no effect on r-code. Error handling cannot be changed after code has been compiled. The -undothrow parameter takes effect only during a compile of .p or .cls source files.
An alternative to the -undothrow startup parameter is to add either ROUTINE-LEVEL ON ERROR UNDO, THROW or BLOCK-LEVEL ON ERROR UNDO, THROW statements to your source files. For more information about these statements, see the OpenEdge Development: ABL Reference.