An application handles Client-Library error and informational messages inline or through a client message callback routine.
When a connection is allocated, it picks up a default client message callback from its parent context. If the parent context has no client message callback installed, then the connection is created without a default client message callback.
After allocating a connection, an application:
Installs a different client message callback for the connection.
Calls ct_diag to initialize inline message handling for the connection. Note that ct_diag automatically de-installs all message callbacks for the connection.
If a client message callback is not installed for a connection or its parent context and inline message handling is not enabled, Client-Library discards message information.
If callbacks are not implemented for a particular programming language or platform version of Client-Library, an application must handle Client-Library messages inline, using ct_diag.
If a connection is handling Client-Library messages through a client message callback, then the callback is called whenever Client-Library generates an error or informational message.
The exception to this rule is that Client-Library does not call the client message callback when a message is generated from within most types of callback routines. Client-Library does call the client message callback when a message is generated within a completion callback. That is, if a Client-Library routine fails within a callback routine other than the completion callback, the routine returns CS_FAIL but does not trigger the client message callback.