# Class MQIllegalStateRuntimeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.jms.JMSRuntimeException
jakarta.jms.IllegalStateRuntimeException
com.sun.messaging.jms.MQIllegalStateRuntimeException

All Implemented Interfaces:
  `com.sun.messaging.jmq.jmsclient.logging.Loggable, Serializable`

public class MQIllegalStateRuntimeException extends jakarta.jms.IllegalStateRuntimeException implements com.sun.messaging.jmq.jmsclient.logging.Loggable

This class is the MQ-specific implementation of jakarta.jms.IllegalStateRuntimeException and adds a new constructor and the methods setLogState and getlogState

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MQIllegalStateRuntimeException(jakarta.jms.IllegalStateException cause)`
  Construct a `MQIllegalStateRuntimeException` to wrap the specified IllegalStateException
  `MQIllegalStateRuntimeException(String detailMessage)`
  Constructs a `MQIllegalStateRuntimeException` with the specified detail message
  `MQIllegalStateRuntimeException(String detailMessage, String errorCode)`
  Constructs a `MQIllegalStateRuntimeException` with the specified detail message and error code.
  `MQIllegalStateRuntimeException(String detailMessage, String errorCode, Throwable cause)`
  Constructs a `MQIllegalStateRuntimeException` with the specified detail message, error code and cause

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `getLogState()`
  return whether this object is logged
  `void`
  `setLogState(boolean state)`
  Specify whether this object is logged.

  ### Methods inherited from class jakarta.jms.JMSRuntimeException

  `getErrorCode`

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### MQIllegalStateRuntimeException

    public MQIllegalStateRuntimeException(String detailMessage)
    Constructs a `MQIllegalStateRuntimeException` with the specified detail message
    Parameters:
      `detailMessage` - a description of the exception

  - ### MQIllegalStateRuntimeException

    public MQIllegalStateRuntimeException(String detailMessage, String errorCode)
    Constructs a `MQIllegalStateRuntimeException` with the specified detail message and error code.
    Parameters:
      `detailMessage` - a description of the exception
      `errorCode` - a provider-specific error code

  - ### MQIllegalStateRuntimeException

    public MQIllegalStateRuntimeException(String detailMessage, String errorCode, Throwable cause)
    Constructs a `MQIllegalStateRuntimeException` with the specified detail message, error code and cause
    Parameters:
      `detailMessage` - a description of the exception
      `errorCode` - a provider-specific error code
      `cause` - the underlying cause of this exception

  - ### MQIllegalStateRuntimeException

    public MQIllegalStateRuntimeException(jakarta.jms.IllegalStateException cause)
    Construct a `MQIllegalStateRuntimeException` to wrap the specified IllegalStateException
    Parameters:
      `cause` - the underlying cause of this exception

- ## Method Details

  - ### setLogState

    public void setLogState(boolean state)
    Specify whether this object is logged.
    Specified by:
      `setLogState` in interface `com.sun.messaging.jmq.jmsclient.logging.Loggable`
    Parameters:
      `state` - whether this object is logged

  - ### getLogState

    public boolean getLogState()
    return whether this object is logged
    Specified by:
      `getLogState` in interface `com.sun.messaging.jmq.jmsclient.logging.Loggable`
    Returns:
      whether this object is logged