Class MQDataException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.ibm.mq.headers.MQDataException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PCFException

public class MQDataException extends Exception
An MQDataException is thrown whenever an IBM MQ PCF error occurs.
See Also:
  • Field Details

    • log

      public static volatile 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 Object exceptionSource
      The object instance that threw the exception.
  • Constructor Details

    • MQDataException

      public MQDataException(int completionCode, int reasonCode, Object source)
      Constructs a new MQDataException object.
      Parameters:
      completionCode - the IBM MQ completion code
      reasonCode - the IBM MQ reason code
      source - the object in which the error occurred
  • Method Details

    • getCompCode

      public int getCompCode()
      Gets the MQSeries completion code
      Returns:
      completion code
    • getErrorCode

      public 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 String getMessage()
      Gets the message detail.
      Overrides:
      getMessage in class Throwable
      Returns:
      the detail