Product Information > JADE Developer’s Reference > Chapter 15 - Using the Messaging Framework > WebSphere-Specific Errors

WebSphere-Specific Errors

The WebSphere MQ application programming interface (API) returns two values describing the success or failure of each call. The first value is the completion code and can be one of the following values.

The second value is the reason code. If the value of the completion code is MQCC_OK, the value of the reason code is MQRC_NONE (0). The other completion code values have many different reason code values, which are described in the WebSphere MQ Messages document.

The JADE messaging framework maps some common reason codes to specific JADE error codes. For example, the openQueue error MQRC_Q_MGR_NAME_ERROR (2058) is mapped to error 31789 (QueueManager is unknown) and MQRC_UNKNOWN_OBJECT_NAME (2085) is mapped to error 31738 (Queue does not exist).

The remaining errors are mapped to JADE error code 31785 (IBMWMQ exception) and the completion code and reason code are included as part of the errorItem text for the exception. For example, an unknown channel name specified in the openQueue option MQSERVER clause causes exception 31785 with an errorItem property of "completion=2, reasonCode=2059".