Added in API level 1

IllegalStateException

open class IllegalStateException : RuntimeException
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.

LimitExceededException

Indicates that the app has exceeded a limit set by the System.

MediaCasStateException

Base class for MediaCas runtime exceptions

MediaCodec.CodecException

Thrown when an internal codec error occurs.

MediaDrm.MediaDrmStateException

Thrown when a general 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 finishConnect method of a SocketChannel is invoked without first successfully invoking its 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.

ServiceStartNotAllowedException

Exception thrown when an app tries to start a Service when it's not allowed to do so.

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.

StartForegroundCalledOnStoppedServiceException

Exception thrown when android.

UnsafeStateException

Exception thrown when a android.app.admin.DevicePolicyManager operation failed because it was not safe to be executed at that moment.

WritePendingException

Unchecked exception thrown when an attempt is made to write to an asynchronous socket channel and a previous write has not completed.

BackgroundServiceStartNotAllowedException

Exception thrown when an app tries to start a background Service when it's not allowed to do so.

ForegroundServiceStartNotAllowedException

Exception thrown when an app tries to start a foreground Service when it's not allowed to do so.

ForegroundServiceTypeException

Base exception thrown when an app tries to start a foreground Service without a valid type.

InvalidForegroundServiceTypeException

Exception thrown when an app tries to start a foreground Service with an invalid type.

MissingForegroundServiceTypeException

Exception thrown when an app tries to start a foreground Service without a type.

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.

Summary

Public constructors

Constructs an IllegalStateException with no detail message.

Constructs an IllegalStateException with the specified detail message.

IllegalStateException(message: String!, cause: Throwable!)

Constructs a new exception with the specified detail message and 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).

Public constructors

IllegalStateException

Added in API level 1
IllegalStateException()

Constructs an IllegalStateException with no detail message. A detail message is a String that describes this particular exception.

IllegalStateException

Added in API level 1
IllegalStateException(s: String!)

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

IllegalStateException

Added in API level 1
IllegalStateException(
    message: String!,
    cause: Throwable!)

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.)

IllegalStateException

Added in API level 1
IllegalStateException(cause: Throwable!)

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, ).

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.)