java.lang.Object | *- java.lang.Throwable | *- java.lang.Exception | *- com.ibm.mq.MQException |
An MQException is thrown whenever a WebSphere MQ error occurs. You can change the output stream for the exceptions that are logged by setting the value of MQException.log. The default value is System.err. This class contains definitions of completion code and error code constants. Constants beginning MQCC_ are WebSphere MQ completion codes, and constants beginning MQRC_ are WebSphere MQ reason codes. The WebSphere MQ Application Programming Reference contains a full description of these errors and their probable causes.
WebSphere MQ completion code giving rise to the error. The possible values are:
The object instance that threw the exception. You can use this as part of your diagnostics when determining the cause of an error.
Stream to which exceptions are logged. (The default is System.err.) If you set this to null, no logging occurs.
WebSphere MQ reason code describing the error. For a full explanation of the reason codes, refer to the WebSphere MQ Application Programming Reference.
public MQException(int completionCode, int reasonCode, Object source)
Construct a new MQException object.
Parameters
public Throwable getCause()
Returns the cause of this MQException, or null if the cause is nonexistent or unknown. Note that this method is available on MQException even under JVMs before Java 2 v1.4.
public Throwable initCause(Throwable cause)
Initializes the cause of this MQException to the specified value. Throws IllegalArgumentException if cause is this MQException or IllegalStateException if the cause has already been set. Returns this MQException. Note that this method is available on MQException even under JVMs before Java 2 v1.4. Applications do not normally use this method.