If a C application registers an exception listener function and context data with a connection, or if a C++ application registers an exception listener with a connection, XMS notifies the application asynchronously if a serious problem occurs with the connection. XMS notifies a C application by calling the exception listener function, passing a pointer to the context data as one parameter and the handle for the error block as the other parameter. XMS notifies a C++ application by calling the onException() method of the exception listener, passing a pointer to the exception as a parameter.
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.
For more information about using exception listener functions in a C application, see Using exception listener functions in C. If you are using C++, see Using exception listeners in C++ instead.
XMS .NET exceptions are all derived from System.Exception. For more information, see Handling errors in .NET.