com.ibm.mq.headers
Class MQDataException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.ibm.mq.headers.MQDataException
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- PCFException
public class MQDataException extends java.lang.Exception
An MQDataException is thrown whenever an IBM MQ PCF error occurs.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description int
completionCode
IBM MQ completion code giving rise to the error.java.lang.Object
exceptionSource
The object instance that threw the exception.static java.io.OutputStreamWriter
log
Historically this represented the stream to which exceptions were be logged.int
reasonCode
IBM MQ reason code describing the error.
-
Constructor Summary
Constructors Constructor and Description MQDataException(int completionCode, int reasonCode, java.lang.Object source)
Constructs a new MQDataException object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
getCompCode()
Gets the MQSeries completion codejava.lang.String
getErrorCode()
Gets the message id which is the non-translatable prefix to each message.java.lang.String
getMessage()
Gets the message detail.int
getReason()
Gets the MQSeries reason code
-
-
-
Field Detail
-
log
public static volatile java.io.OutputStreamWriter log
Historically this represented the stream to which exceptions were be logged.This logging was determined to be unnecessary and this field no longer has any effect. It is retained purely for compatibility with existing code which may expect to set it.
-
completionCode
public int completionCode
IBM MQ completion code giving rise to the error. The possible values are:- MQDataException.MQCC_WARNING
- MQDataException.MQCC_FAILED
-
reasonCode
public int reasonCode
IBM MQ reason code describing the error.
-
exceptionSource
public transient java.lang.Object exceptionSource
The object instance that threw the exception.
-
-
Constructor Detail
-
MQDataException
public MQDataException(int completionCode, int reasonCode, java.lang.Object source)
Constructs a new MQDataException object.- Parameters:
completionCode
- the IBM MQ completion codereasonCode
- the IBM MQ reason codesource
- the object in which the error occurred
-
-
Method Detail
-
getCompCode
public int getCompCode()
Gets the MQSeries completion code- Returns:
- completion code
-
getErrorCode
public java.lang.String getErrorCode()
Gets the message id which is the non-translatable prefix to each message.- Returns:
- message id
-
getReason
public int getReason()
Gets the MQSeries reason code- Returns:
- reason
-
getMessage
public java.lang.String getMessage()
Gets the message detail.- Overrides:
getMessage
in classjava.lang.Throwable
- Returns:
- the detail
-
-