Sun Java System Message Queue 4.3 Developer's Guide for C Clients

ProcedureTo Handle Errors in Your Code

  1. Call MQStatusIsError, passing it an MQStatus result for the function whose result you want to test.

  2. If the MQStatusIsError function returns MQ_TRUE , call MQGetStatusCode or MQGetStatusString to identify the error.

  3. If the status code and string information is not sufficient to identify the cause of the error, you can get additional diagnostic information by calling MQGetErrorTrace to obtain the calling thread’s current error trace if this information is available.

    Chapter 4, Reference, lists common errors returned for each function. In addition to these errors, the following error codes may be returned by any Message Queue C function:




    In addition, the MQ_TIMEOUT_EXPIRED can return from any Message Queue C function that communicates with the Message Queue broker if the connection MQ_ACK_TIMEOUT_PROPERTY is set to a non-zero value.