DO ON QUIT UNDO, RETRY:
IF RETRY THEN DO: DISPLAY "Application encountered a QUIT condition and will terminate.". UNDO, LEAVE. END. FIND FIRST customer WHERE CustNum = 1000 NO-ERROR. IF ERROR-STATUS:ERROR THEN QUIT. END. DISPLAY "Application continues...". /* Never executes. */ |
ON QUIT
UNDO label1 , LEAVE label2 , NEXT label2 , RETRY label1 , RETURN return-value ERROR return-value error-object-expression NO-APPLY |
Option
|
Description
|
return-value
|
The CHARACTER string you provide is passed to the caller. The caller can use the RETURN-VALUE function to read the returned value. For user-defined functions, the value must match the specified return type.
|
ERROR
|
Raises ERROR in the caller and undoes the current subtransaction. You cannot specify ERROR within a user-interface trigger block or a destructor.
|
ERROR return-value
|
Raises ERROR in the caller and undoes the current subtransaction (except for user-defined functions). The CHARACTER string you provide is available to the caller in the RETURN-VALUE function. In structured error handling, the AVM also creates an AppError object and stores the return-value in the ReturnValue property.
|
ERROR error-object-expression
|
In structured error handling, raises ERROR in the caller and undoes the current subtransaction.The specified error object is your code. If it is an AppError object, the caller can also use the RETURN-VALUE function to read the setting of the ReturnValue property.
|
NO-APPLY
|
In a user-interface trigger, prevents the AVM from performing the default behavior for that event.
|