setErrorHandler procedure
- Last Updated: September 8, 2021
- 1 minute read
- OpenEdge
- Version 12.2
setErrorHandler procedure
Sets the error-handling procedure.
Syntax
|
Applies to
Session objects
Notes
- The application must create the error-handling messageConsumer object and call the
setErrorHandlerprocedure after calling beginSession procedure. If the application does not call thesetErrorHandlerprocedure, a default error handler displays the error message and the properties in alert boxes. - The application should handle asynchronously reported error conditions
programmatically by creating an error-handling Message Consumer object and passing it to
the
setErrorHandlerprocedure in the Session object. ThesetErrorHandlerprocedure creates an error-handling Message Consumer object. - Asynchronous conditions are always reported as a
TextMessagewith several possibleCHARACTERmessage properties. TheCHARACTERproperties 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). - getPropertyNames function can be used to get the list of properties in the error message header.
See also
For more information, see Error and condition handling.