An application uses an exception listener to be notified asynchronously of a problem with a connection.
If an application uses a connection only to consume messages asynchronously, and for no other purpose, then the only way the application can learn about a problem with the connection is by using an exception listener. In other situations, an exception listener can provide a more immediate way of learning about a problem with a connection than waiting until the next synchronous call to XMS.
Function | Description |
---|---|
onException | Notify the application of a problem with a connection. |
xmsVOID onException(xmsCONTEXT context, xmsHErrorBlock errorBlock);
Notify the application of a problem with a connection.
onException() is the exception listener function that is registered with the connection. The name of the function does not have to be onException.
For more information about using exception listener functions, see Exception listener functions in C.