Package java.lang

Class IllegalMonitorStateException

  • All Implemented Interfaces:
    Serializable

    public class IllegalMonitorStateException
    extends RuntimeException
    Thrown when a monitor operation is attempted when the monitor is not in the correct state, for example when a thread attempts to exit a monitor which it does not own.
    See Also:
    Serialized Form
    • Constructor Detail

      • IllegalMonitorStateException

        public IllegalMonitorStateException()
        Constructs a new IllegalMonitorStateException that includes the current stack trace.
      • IllegalMonitorStateException

        public IllegalMonitorStateException​(String detailMessage)
        Constructs a new IllegalArgumentException with the current stack trace and the specified detail message.
        Parameters:
        detailMessage - the detail message for this exception.