[progress Communities] [progress Openedge Abl] Forum Post: How To Catch Error Details In An...

Status
Not open for further replies.
S

slacroixak

Guest
Hi Forum, (OE 11.6.2 with StateFree Appserver) Catching an Progress.Lang.Error works fine for a simple RUN on AppServer (synchronous). I mean -undothrow 2 does the job fine when an unhandled error condition occurs. On the other hand, I can't find a way to catch an error object when working in asynchronous fashion. At best, in my async response procedure I can see an error occured on the AppServer side based on SELF:ERROR and ERROR-STATUS:ERROR that are set, but without any detail as ERROR-STATUS:NUM-MESSAGE remains set to 0 and ERROR-STATUS:GET-MESSAGE(1) remains empty. Did I miss something? Is that a known limitation? The impact is rather bad as error messages no longer end up in the AppServer log if we use -undothrow 2 or the BLOCK-LEVEL ON ERROR UNDO, THROW directive in the code. Thanks /S 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.

Continue reading...
 
Status
Not open for further replies.
Top