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 when 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 it learns about a problem with the connection only by using an exception listener.
For more information about using exception listener functions in a C application, see Exception listener functions in C. If you are using C++, see Exception listeners in C++.
XMS .NET exceptions are all derived from System.Exception. For more information, see Error handling in .NET.