Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming ABL Client Applications : Handling conditions and return values : Handling conditions on the RUN statement
 
Handling conditions on the RUN statement
When you execute a synchronous remote procedure, all of the following conditions are handled by OpenEdge exactly as if they were raised within a local procedure call:
*Any condition raised during execution of the synchronous RUN statement that invokes the remote procedure
*Any ERROR condition raised by executing the RETURN ERROR statement in the remote procedure itself
If you use the NO-ERROR option on the RUN statement, you can obtain any information about errors that result from executing the RUN statement using the ERROR-STATUS system handle.
A remote procedure executed persistently returns as a non-persistent procedure when the remote procedure does one of the following:
*Completes with an unhandled STOP or QUIT condition
*Executes a RETURN ERROR statement
For an asynchronous remote procedure, conditions that occur on the RUN statement itself are handled exactly as for a synchronous remote procedure. However, unhandled conditions that occur during execution of the asynchronous remote procedure are propagate back to the client in the context of the event procedure. The result can be referenced within the event procedure using the RETURN-VALUE function, the ERROR-STATUS system handle, and the associated asynchronous request handle (SELF). Any conditions that result from problems with the event procedure itself are handled in the context of the PROCESS EVENTS or blocking I/O statement that executes the event procedure. For more information on handling conditions for asynchronous remote procedures, see Handling the response from an asynchronous request.