Summary: Ctors | Inherited Methods
public
class
IllegalStateException
extends RuntimeException
| java.lang.Object | ||||
| ↳ | java.lang.Throwable | |||
| ↳ | java.lang.Exception | |||
| ↳ | java.lang.RuntimeException | |||
| ↳ | java.lang.IllegalStateException | |||
Known direct subclasses
AcceptPendingException, AlreadyBoundException, AlreadyConnectedException, CancellationException, CancelledKeyException, ClosedDirectoryStreamException, ClosedFileSystemException, ClosedSelectorException, ClosedWatchServiceException, ConnectionPendingException, FormatterClosedException, IllegalBlockingModeException, InvalidMarkException, MediaCasStateException, MediaCodec.CodecException, and 11 others.
| AcceptPendingException | Unchecked exception thrown when an attempt is made to initiate an accept operation on a channel and a previous accept operation has not completed. |
| AlreadyBoundException | Unchecked exception thrown when an attempt is made to bind the socket a network oriented channel that is already bound. |
| AlreadyConnectedException |
Unchecked exception thrown when an attempt is made to connect a SocketChannel that is already connected.
|
| CancellationException |
Exception indicating that the result of a value-producing task,
such as a FutureTask, cannot be retrieved because the task
was cancelled.
|
| CancelledKeyException | Unchecked exception thrown when an attempt is made to use a selection key that is no longer valid. |
| ClosedDirectoryStreamException | Unchecked exception thrown when an attempt is made to invoke an operation on a directory stream that is closed. |
| ClosedFileSystemException | Unchecked exception thrown when an attempt is made to invoke an operation on a file and the file system is closed. |
| ClosedSelectorException | Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a closed selector. |
| ClosedWatchServiceException | Unchecked exception thrown when an attempt is made to invoke an operation on a watch service that is closed. |
| ConnectionPendingException |
Unchecked exception thrown when an attempt is made to connect a SocketChannel for which a non-blocking connection operation is already in
progress.
|
| FormatterClosedException | Unchecked exception thrown when the formatter has been closed. |
| IllegalBlockingModeException | Unchecked exception thrown when a blocking-mode-specific operation is invoked upon a channel in the incorrect blocking mode. |
| InvalidMarkException | Unchecked exception thrown when an attempt is made to reset a buffer when its mark is not defined. |
| MediaCasStateException | Base class for MediaCas runtime exceptions |
| MediaCodec.CodecException | Thrown when an internal codec error occurs. |
| MediaDrm.MediaDrmStateException | Thrown when an unrecoverable failure occurs during a MediaDrm operation. |
| MediaDrmResetException | This exception is thrown when the MediaDrm instance has become unusable due to a restart of the mediaserver process. |
| NoConnectionPendingException |
Unchecked exception thrown when the SocketChannel#finishConnect method of a SocketChannel is invoked without first
successfully invoking its SocketChannel#connect method.
|
| NonReadableChannelException | Unchecked exception thrown when an attempt is made to read from a channel that was not originally opened for reading. |
| NonWritableChannelException | Unchecked exception thrown when an attempt is made to write to a channel that was not originally opened for writing. |
| NotYetBoundException | Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a server socket channel that is not yet bound. |
| NotYetConnectedException | Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a socket channel that is not yet connected. |
| OverlappingFileLockException | Unchecked exception thrown when an attempt is made to acquire a lock on a region of a file that overlaps a region already locked by the same Java virtual machine, or when another thread is already waiting to lock an overlapping region of the same file. |
| ReadPendingException | Unchecked exception thrown when an attempt is made to read from an asynchronous socket channel and a previous read has not completed. |
| ShutdownChannelGroupException | Unchecked exception thrown when an attempt is made to construct a channel in a group that is shutdown or the completion handler for an I/O operation cannot be invoked because the channel group has terminated. |
| WritePendingException | Unchecked exception thrown when an attempt is made to write to an asynchronous socket channel and a previous write has not completed. |
Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation.
Public constructors | |
|---|---|
IllegalStateException()
Constructs an IllegalStateException with no detail message. |
|
IllegalStateException(String s)
Constructs an IllegalStateException with the specified detail message. |
|
IllegalStateException(String message, Throwable cause)
Constructs a new exception with the specified detail message and cause. |
|
IllegalStateException(Throwable cause)
Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). |
|
Inherited methods | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
| |||||||||||||||||||||||||||
|
From class
| |||||||||||||||||||||||||||
public IllegalStateException ()
Constructs an IllegalStateException with no detail message. A detail message is a String that describes this particular exception.
public IllegalStateException (String s)
Constructs an IllegalStateException with the specified detail message. A detail message is a String that describes this particular exception.
| Parameters | |
|---|---|
s |
String: the String that contains a detailed message |
public IllegalStateException (String message, Throwable cause)
Constructs a new exception with the specified detail message and cause.
Note that the detail message associated with cause is
not automatically incorporated in this exception's detail
message.
| Parameters | |
|---|---|
message |
String: the detail message (which is saved for later retrieval
by the Throwable#getMessage() method). |
cause |
Throwable: the cause (which is saved for later retrieval by the
Throwable#getCause() method). (A null value
is permitted, and indicates that the cause is nonexistent or
unknown.) |
public IllegalStateException (Throwable cause)
Constructs a new exception with the specified cause and a detail
message of (cause==null ? null : cause.toString()) (which
typically contains the class and detail message of cause).
This constructor is useful for exceptions that are little more than
wrappers for other throwables (for example, PrivilegedActionException).
| Parameters | |
|---|---|
cause |
Throwable: the cause (which is saved for later retrieval by the
Throwable#getCause() method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.) |