Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming ABL Client Applications : Managing asynchronous requests : Handling the response from an asynchronous request : Obtaining error information
Obtaining error information
With an asynchronous remote procedure request, the RUN...ASYNCHRONOUS statement returns once the client request has been validated. Any errors that occur while processing the RUN...ASYNCHRONOUS statement are returned as a STOP or ERROR condition in the context of the RUN...ASYNCHRONOUS statement. Information on errors that occur once the asynchronous request has been submitted can be obtained by using the ERROR-STATUS system handle within the event procedure for the asynchronous request.
If the asynchronous request completes with a condition, you can use attributes on the asynchronous request handle to determine the condition that the request completed with. For example:
*ERROR attribute indicates if the request completed with an ERROR condition
*STOP attribute indicates if the request completed with a STOP condition
*QUIT attribute indicates if the request completed with a QUIT condition
Note that any asynchronous request that raises the STOP condition (by executing the STOP statement), and does not handle the condition itself, also sets the STOP attribute of its corresponding asynchronous request handle to TRUE.
If any errors occur when the event procedure attempts to execute, The client session displays an error message in the context of the blocking I/O statement, and no information is stored in the asynchronous request handle. Errors where this might occur include, for example, an event procedure whose INPUT parameters do not match in order and type with the output parameters from the remote request.