Progress
External Program
Interfaces


setErrorHandler

In Session Objects

To handle asynchronous conditions programmatically, applications create a messageConsumer object and pass it to the setErrorHandler procedure in the Session object. Asynchronous conditions are always reported as a TextMessage with several possible CHAR message properties. The CHAR properties that might be included in the message header are: exception, errorCode, linkedException-1, linkedException-2… linkedException-N (where N is a number of additional exceptions linked to the main exception).

The getPropertyNames message function can be used to get the list of properties in the error message header. If the application does not call setErrorHandler, a default error handler displays the error message and the properties in alert boxes:

SYNTAX
PROCEDURE setErrorHandler. 
DEFINE INPUT PARAMETER messageConsumer AS HANDLE. 

NOTE: The application must create the error-handling messageConsumer object and call setErrorHandler after calling beginSession.

For information on this procedure in context, see the "Error Handling" section in Accessing SonicMQ Messaging From the Progress 4GL."For an example, see the "Installing an Error Handler To Handle an Asynchronous Error" section in Using the SonicMQ Adapter."


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095