Package com.ibm.mq.headers
Class MQDataException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.ibm.mq.headers.MQDataException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PCFException
An MQDataException is thrown whenever an IBM MQ PCF error occurs.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionintIBM MQ completion code giving rise to the error.The object instance that threw the exception.static OutputStreamWriterHistorically this represented the stream to which exceptions were be logged.intIBM MQ reason code describing the error. -
Constructor Summary
ConstructorsConstructorDescriptionMQDataException(int completionCode, int reasonCode, Object source) Constructs a new MQDataException object. -
Method Summary
Modifier and TypeMethodDescriptionintGets the MQSeries completion codeGets the message id which is the non-translatable prefix to each message.Gets the message detail.intGets the MQSeries reason codeMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
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 completionCodeIBM MQ completion code giving rise to the error. The possible values are:- MQDataException.MQCC_WARNING
- MQDataException.MQCC_FAILED
-
reasonCode
public int reasonCodeIBM MQ reason code describing the error. -
exceptionSource
The object instance that threw the exception.
-
-
Constructor Details
-
MQDataException
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 Details
-
getCompCode
public int getCompCode()Gets the MQSeries completion code- Returns:
- completion code
-
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
Gets the message detail.- Overrides:
getMessagein classThrowable- Returns:
- the detail
-