WebSphere Message Service Clients for C/C++ and .NET, Version 1.2 Operating Systems: Linux, Windows

Handling exceptions

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.

Related concepts
Starting and stopping a connection
Closing a connection
Connecting to a WebSphere service integration bus

Concept topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.