RuntimeException  |  API reference  |  Android Developers

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

This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied. 

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. 
ArrayIndexOutOfBoundsException Thrown to indicate that an array has been accessed with an illegal index. 
AuthenticationRequiredException Specialization of SecurityException that is thrown when authentication is needed from the end user before viewing the content. 
BackendBusyException Indicates a transient error that prevented a key operation from being created. 
BackgroundServiceStartNotAllowedException Exception thrown when an app tries to start a background Service when it's not allowed to do so. 
BadParcelableException Exception thrown when a Parcelable is malformed or otherwise invalid. 
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. 
CursorIndexOutOfBoundsException An exception indicating that a cursor is out of bounds. 
DateTimeParseException An exception thrown when an error occurs during parsing. 
DirectoryIteratorException Runtime exception thrown if an I/O error is encountered when iterating over the entries in a directory. 
DuplicateFormatFlagsException Unchecked exception thrown when duplicate flags are provided in the format specifier. 
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. 
FormatFlagsConversionMismatchException Unchecked exception thrown when a conversion and flag are incompatible. 
FormatterClosedException Unchecked exception thrown when the formatter has been closed. 
Fragment.InstantiationException This class was deprecated in API level 28. Use Fragment.InstantiationException 
IllegalBlockingModeException Unchecked exception thrown when a blocking-mode-specific operation is invoked upon a channel in the incorrect blocking mode. 
IllegalChannelGroupException Unchecked exception thrown when an attempt is made to open a channel in a group that was not created by the same provider. 
IllegalCharsetNameException Unchecked exception thrown when a string that is not a legal charset name is used as such. 
IllegalFormatCodePointException Unchecked exception thrown when a character with an invalid Unicode code point as defined by Character.isValidCodePoint is passed to the Formatter
IllegalFormatConversionException Unchecked exception thrown when the argument corresponding to the format specifier is of an incompatible type. 
IllegalFormatException Unchecked exception thrown when a format string contains an illegal syntax or a format specifier that is incompatible with the given arguments. 
IllegalFormatFlagsException Unchecked exception thrown when an illegal combination flags is given. 
IllegalFormatPrecisionException Unchecked exception thrown when the precision is a negative value other than -1, the conversion does not support a precision, or the value is otherwise unsupported. 
IllegalFormatWidthException Unchecked exception thrown when the format width is a negative value other than -1 or is otherwise unsupported. 
IllegalSelectorException Unchecked exception thrown when an attempt is made to register a channel with a selector that was not created by the provider that created the channel. 
IllegalThreadStateException Thrown to indicate that a thread is not in an appropriate state for the requested operation. 
InlineExecutionProhibitedException Thrown when an executor runs a submitted runnable inline in Executor.execute(Runnable) and UrlRequest.Builder.setDirectExecutorAllowed was not called. 
InputMismatchException Thrown by a Scanner to indicate that the token retrieved does not match the pattern for the expected type, or that the token is out of range for the expected type. 
InvalidForegroundServiceTypeException Exception thrown when an app tries to start a foreground Service with an invalid type. 
InvalidMarkException Unchecked exception thrown when an attempt is made to reset a buffer when its mark is not defined. 
InvalidParameterException This exception, designed for use by the JCA/JCE engine classes, is thrown when an invalid parameter is passed to a method. 
InvalidPathException Unchecked exception thrown when path string cannot be converted into a Path because the path string contains invalid characters, or the path string is invalid for other file system specific reasons. 
KeyCharacterMap.UnavailableException Thrown by KeyCharacterMap.load when a key character map could not be loaded. 
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. 
MissingForegroundServiceTypeException Exception thrown when an app tries to start a foreground Service without a type. 
MissingFormatArgumentException Unchecked exception thrown when there is a format specifier which does not have a corresponding argument or if an argument index refers to an argument that does not exist. 
MissingFormatWidthException Unchecked exception thrown when the format width is required. 
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. 
NumberFormatException Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format. 
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. 
PatternSyntaxException Unchecked exception thrown to indicate a syntax error in a regular-expression pattern. 
ProviderMismatchException Unchecked exception thrown when an attempt is made to invoke a method on an object created by one file system provider with a parameter created by a different file system provider. 
RSDriverException This class was deprecated in API level 31. Renderscript has been deprecated in API level 31. Please refer to the migration guide for the proposed alternatives. 
RSIllegalArgumentException This class was deprecated in API level 31. Renderscript has been deprecated in API level 31. Please refer to the migration guide for the proposed alternatives. 
RSInvalidStateException This class was deprecated in API level 31. Renderscript has been deprecated in API level 31. Please refer to the migration guide for the proposed alternatives. 
ReadOnlyBufferException Unchecked exception thrown when a content-mutation method such as put or compact is invoked upon a read-only buffer. 
ReadOnlyFileSystemException Unchecked exception thrown when an attempt is made to update an object associated with a read-only FileSystem
ReadPendingException Unchecked exception thrown when an attempt is made to read from an asynchronous socket channel and a previous read has not completed. 
ReceiverCallNotAllowedException This exception is thrown from Context.registerReceiver and Context.bindService when these methods are being used from an BroadcastReceiver component. 
RecoverableSecurityException Specialization of SecurityException that contains additional information about how to involve the end user to recover from the exception. 
SQLiteAbortException An exception that indicates that the SQLite program was aborted. 
SQLiteAccessPermException This exception class is used when sqlite can't access the database file due to lack of permissions on the file. 
SQLiteBindOrColumnIndexOutOfRangeException Thrown if the bind or column parameter index is out of range. 
SQLiteBlobTooBigException  
SQLiteCantOpenDatabaseException  
SQLiteConstraintException An exception that indicates that an integrity constraint was violated. 
SQLiteDatabaseCorruptException An exception that indicates that the SQLite database file is corrupt. 
SQLiteDatabaseLockedException Thrown if the database engine was unable to acquire the database locks it needs to do its job. 
SQLiteDatatypeMismatchException  
SQLiteDiskIOException Indicates that an IO error occurred while accessing the SQLite database file. 
SQLiteDoneException An exception that indicates that the SQLite program is done. 
SQLiteException A SQLite exception that indicates there was an error with SQL parsing or execution. 
SQLiteFullException An exception that indicates that the SQLite database is full. 
SQLiteMisuseException This error can occur if the application creates a SQLiteStatement object and allows multiple threads in the application use it at the same time. 
SQLiteOutOfMemoryException  
SQLiteReadOnlyDatabaseException  
SQLiteTableLockedException  
SecureKeyImportUnavailableException Indicates that the Keystore does not support securely importing wrapped keys. 
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 Service.startForeground is called on a service that's not actually started. 
StringIndexOutOfBoundsException Thrown by String methods to indicate that an index is either negative or greater than the size of the string. 
StrongBoxUnavailableException Indicates that an operation could not be performed because the requested security hardware is not available. 
SystemUpdatePolicy.ValidationFailedException An exception class that represents various validation errors thrown from SystemUpdatePolicy.setFreezePeriods and DevicePolicyManager.setSystemUpdatePolicy 
UnknownFormatConversionException Unchecked exception thrown when an unknown conversion is given. 
UnknownFormatFlagsException Unchecked exception thrown when an unknown flag is given. 
UnresolvedAddressException Unchecked exception thrown when an attempt is made to invoke a network operation upon an unresolved socket address. 
UnsafeStateException Exception thrown when a DevicePolicyManager operation failed because it was not safe to be executed at that moment. 
UnsupportedAddressTypeException Unchecked exception thrown when an attempt is made to bind or connect to a socket address of a type that is not supported. 
UnsupportedCharsetException Unchecked exception thrown when no support is available for a requested charset. 
UnsupportedTemporalTypeException UnsupportedTemporalTypeException indicates that a ChronoField or ChronoUnit is not supported for a Temporal class. 
WritePendingException Unchecked exception thrown when an attempt is made to write to an asynchronous socket channel and a previous write has not completed. 
ZoneRulesException Thrown to indicate a problem with time-zone configuration.