Package java.lang
Class IllegalMonitorStateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.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 Summary
Constructors Constructor Description IllegalMonitorStateException()Constructs a newIllegalMonitorStateExceptionthat includes the current stack trace.IllegalMonitorStateException(String detailMessage)Constructs a newIllegalArgumentExceptionwith the current stack trace and the specified detail message. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IllegalMonitorStateException
public IllegalMonitorStateException()Constructs a newIllegalMonitorStateExceptionthat includes the current stack trace. -
IllegalMonitorStateException
Constructs a newIllegalArgumentExceptionwith the current stack trace and the specified detail message.- Parameters:
detailMessage- the detail message for this exception.
-