Handling conditions on the RUN statement
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
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
RUNstatement that invokes the remote procedure - Any
ERRORcondition raised by executing theRETURNERRORstatement 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
STOPorQUITcondition - Executes a
RETURNERRORstatement
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.