Previous Next

ON QUIT phrase
Describes the processing that occurs when a QUIT statement is executed during a block. By default, the QUIT statement saves the current transaction and then returns to the operating system or to the tool from which the routine was invoked (such as the OpenEdge Editor).
Note:
Syntax 
 
ON QUIT
  [ UNDO [ label1 ] ]
  [     , LEAVE [ label2 ]
     |  , NEXT [ label2 ]
     |  , RETRY [ label1 ]
     |  , RETURN [ return-value |
                  ERROR [ return-value | error-object-expression ] |
                  NO-APPLY ] 
  ]
UNDO [ label1 ]
Indicates that the specified block is undone. If you do not specify the UNDO option, then the current transaction is committed when the QUIT statement is executed.
LEAVE [ label2 ]
Indicates that after committing or undoing the transaction, the AVM leaves the block labeled label. If you do not name a block, the AVM leaves the block with the ON QUIT phrase in its heading.
NEXT [ label2 ]
Indicates that after committing or undoing the transaction, the AVM executes the next iteration of the block you name with the label option. If you do not name a block with the NEXT option, the AVM executes the next iteration of the block with the ON QUIT phrase in its heading.
RETRY [ label1 ]
Indicates that after committing or undoing the processing of a block, the AVM repeats the same iteration of the block that was undone or committed.
RETRY is the default if you do not specify LEAVE, NEXT, RETRY, or RETURN.
RETURN ...
Returns to the calling routine, or if there is no calling routine, returns to the OpenEdge Editor. The following table describes various RETURN cases:
 
return-value 
ERROR
ERROR return-value 
The AVM also creates an Progress.Lang.AppError object and stores the return-value in the ReturnValue property.
ERROR error-object-expression 
The specified error object is created and populated according to your code. If this is an Progress.Lang.AppError object, the caller can use the RETURN-VALUE function to read the setting of the ReturnValue property.
NO-APPLY
You cannot specify ERROR within a user-interface trigger block or a destructor. You can specify the NO-APPLY option only within a user-interface trigger block.
See also 
ON ENDKEY phrase, ON ERROR phrase, ON STOP phrase, QUIT statement, RETURN statement, RETURN-VALUE function, UNDO statement

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.