Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/java/lang/Throwable#pubctors) \| [Protected Ctors](https://developer.android.com/reference/java/lang/Throwable#proctors) \| [Methods](https://developer.android.com/reference/java/lang/Throwable#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/java/lang/Throwable#inhmethods)

# Throwable


`
public


class
Throwable
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/java/io/Serializable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | java.lang.Throwable |

Known direct subclasses [Error](https://developer.android.com/reference/java/lang/Error), [Exception](https://developer.android.com/reference/java/lang/Exception), [Violation](https://developer.android.com/reference/android/os/strictmode/Violation) [Error](https://developer.android.com/reference/java/lang/Error) An `Error` is a subclass of `Throwable` that indicates serious problems that a reasonable application should not try to catch. [Exception](https://developer.android.com/reference/java/lang/Exception) The class `Exception` and its subclasses are a form of `Throwable` that indicates conditions that a reasonable application might want to catch. [Violation](https://developer.android.com/reference/android/os/strictmode/Violation) Root class for all StrictMode violations. Known indirect subclasses [AEADBadTagException](https://developer.android.com/reference/javax/crypto/AEADBadTagException), [AbstractMethodError](https://developer.android.com/reference/java/lang/AbstractMethodError), [AcceptPendingException](https://developer.android.com/reference/java/nio/channels/AcceptPendingException), [AccessControlException](https://developer.android.com/reference/java/security/AccessControlException), [AccessDeniedException](https://developer.android.com/reference/java/nio/file/AccessDeniedException), [AccountsException](https://developer.android.com/reference/android/accounts/AccountsException), [AclNotFoundException](https://developer.android.com/reference/java/security/acl/AclNotFoundException), [AconfigStorageReadException](https://developer.android.com/reference/android/os/flagging/AconfigStorageReadException), [ActivityNotFoundException](https://developer.android.com/reference/android/content/ActivityNotFoundException), [AdServicesException](https://developer.android.com/reference/android/adservices/exceptions/AdServicesException), [AlreadyBoundException](https://developer.android.com/reference/java/nio/channels/AlreadyBoundException), [AlreadyConnectedException](https://developer.android.com/reference/java/nio/channels/AlreadyConnectedException), [AlreadyPersonalizedException](https://developer.android.com/reference/android/security/identity/AlreadyPersonalizedException), [AndroidException](https://developer.android.com/reference/android/util/AndroidException), [AndroidRuntimeException](https://developer.android.com/reference/android/util/AndroidRuntimeException), and 462 others. [AEADBadTagException](https://developer.android.com/reference/javax/crypto/AEADBadTagException) This exception is thrown when a `https://developer.android.com/reference/javax/crypto/Cipher` operating in an AEAD mode (such as GCM/CCM) is unable to verify the supplied authentication tag. [AbstractMethodError](https://developer.android.com/reference/java/lang/AbstractMethodError) Thrown when an application tries to call an abstract method. [AcceptPendingException](https://developer.android.com/reference/java/nio/channels/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](https://developer.android.com/reference/java/security/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.


[AccessDeniedException](https://developer.android.com/reference/java/nio/file/AccessDeniedException) Checked exception thrown when a file system operation is denied, typically due to a file permission or other access check. [AccountsException](https://developer.android.com/reference/android/accounts/AccountsException) [AclNotFoundException](https://developer.android.com/reference/java/security/acl/AclNotFoundException) *This class was deprecated
in API level 33.
This class is deprecated and subject to removal in a future
version of Java SE. It has been replaced by `java.security.Policy`
and related classes since 1.2.* [AconfigStorageReadException](https://developer.android.com/reference/android/os/flagging/AconfigStorageReadException) Exception thrown when an error occurs while reading from Aconfig Storage. [ActivityNotFoundException](https://developer.android.com/reference/android/content/ActivityNotFoundException) This exception is thrown when a call to `https://developer.android.com/reference/android/content/Context#startActivity(android.content.Intent)` or one of its variants fails because an Activity can not be found to execute the given Intent. [AdServicesException](https://developer.android.com/reference/android/adservices/exceptions/AdServicesException) *This class was deprecated
in API level 37.
The Rubidium (Rb) Measurement APIs, including those in
android.adservices.measurement, are being deprecated. There are no direct replacement APIs
for the Measurement APIs. Developers currently using these APIs should cease integration, as
calls to these APIs will be rejected in upcoming Android releases as part of a soft removal
process. Please refer to the official Privacy Sandbox developer documentation and
announcements for more details on this deprecation and the future roadmap of Privacy Sandbox
on Android: https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/* [AlreadyBoundException](https://developer.android.com/reference/java/nio/channels/AlreadyBoundException) Unchecked exception thrown when an attempt is made to bind the socket a network oriented channel that is already bound. [AlreadyConnectedException](https://developer.android.com/reference/java/nio/channels/AlreadyConnectedException) Unchecked exception thrown when an attempt is made to connect a `https://developer.android.com/reference/java/nio/channels/SocketChannel` that is already connected. [AlreadyPersonalizedException](https://developer.android.com/reference/android/security/identity/AlreadyPersonalizedException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [AndroidException](https://developer.android.com/reference/android/util/AndroidException) Base class for all checked exceptions thrown by the Android frameworks. [AndroidRuntimeException](https://developer.android.com/reference/android/util/AndroidRuntimeException) Base class for all unchecked exceptions thrown by the Android frameworks. [AnnotationFormatError](https://developer.android.com/reference/java/lang/annotation/AnnotationFormatError) Thrown when the annotation parser attempts to read an annotation from a class file and determines that the annotation is malformed. [AnnotationTypeMismatchException](https://developer.android.com/reference/java/lang/annotation/AnnotationTypeMismatchException) Thrown to indicate that a program has attempted to access an element of an annotation whose type has changed after the annotation was compiled (or serialized). [AppFunctionException](https://developer.android.com/reference/android/app/appfunctions/AppFunctionException) App function related error. [AppInteractionDeniedException](https://developer.android.com/reference/android/app/AppInteractionDeniedException) Exception thrown when an app interaction is denied. [AppInteractionException](https://developer.android.com/reference/android/app/AppInteractionException) Exception thrown when an app interaction operation fails. [AppSearchException](https://developer.android.com/reference/android/app/appsearch/exceptions/AppSearchException) An exception thrown by `https://developer.android.com/reference/android/app/appsearch/AppSearchSession` or a subcomponent. [ArithmeticException](https://developer.android.com/reference/java/lang/ArithmeticException) Thrown when an exceptional arithmetic condition has occurred. [ArrayIndexOutOfBoundsException](https://developer.android.com/reference/java/lang/ArrayIndexOutOfBoundsException) Thrown to indicate that an array has been accessed with an illegal index. [ArrayStoreException](https://developer.android.com/reference/java/lang/ArrayStoreException) Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects. [AssertionError](https://developer.android.com/reference/java/lang/AssertionError) Thrown to indicate that an assertion has failed. [AssertionFailedError](https://developer.android.com/reference/android/test/AssertionFailedError) *This class was deprecated
in API level 16.
use junit.framework.AssertionFailedError* [AsynchronousCloseException](https://developer.android.com/reference/java/nio/channels/AsynchronousCloseException) Checked exception received by a thread when another thread closes the channel or the part of the channel upon which it is blocked in an I/O operation. [AtomicMoveNotSupportedException](https://developer.android.com/reference/java/nio/file/AtomicMoveNotSupportedException) Checked exception thrown when a file cannot be moved as an atomic file system operation. [AuthenticationRequiredException](https://developer.android.com/reference/android/app/AuthenticationRequiredException) Specialization of `https://developer.android.com/reference/java/lang/SecurityException` that is thrown when authentication is needed from the end user before viewing the content. [AuthenticatorException](https://developer.android.com/reference/android/accounts/AuthenticatorException) [BackendBusyException](https://developer.android.com/reference/android/security/keystore/BackendBusyException) Indicates a transient error that prevented a key operation from being created. [BackgroundServiceStartNotAllowedException](https://developer.android.com/reference/android/app/BackgroundServiceStartNotAllowedException) Exception thrown when an app tries to start a background `https://developer.android.com/reference/android/app/Service` when it's not allowed to do so. [BackingStoreException](https://developer.android.com/reference/java/util/prefs/BackingStoreException) Thrown to indicate that a preferences operation could not complete because of a failure in the backing store, or a failure to contact the backing store. [BadPaddingException](https://developer.android.com/reference/javax/crypto/BadPaddingException) This exception is thrown when a particular padding mechanism is expected for the input data but the data is not padded properly. [BadParcelableException](https://developer.android.com/reference/android/os/BadParcelableException) Exception thrown when a `https://developer.android.com/reference/android/os/Parcelable` is malformed or otherwise invalid. [Base64DataException](https://developer.android.com/reference/android/util/Base64DataException) This exception is thrown by `https://developer.android.com/reference/android/util/Base64InputStream` or `https://developer.android.com/reference/android/util/Base64OutputStream` when an error is detected in the data being decoded. [BatchUpdateException](https://developer.android.com/reference/java/sql/BatchUpdateException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown when an error occurs during a batch update operation. [BindException](https://developer.android.com/reference/java/net/BindException) Signals that an error occurred while attempting to bind a socket to a local address and port. [BluetoothSocketException](https://developer.android.com/reference/android/bluetooth/BluetoothSocketException) Thrown when an error occurs during a Bluetooth Socket related exception. [BootstrapMethodError](https://developer.android.com/reference/java/lang/BootstrapMethodError) Thrown to indicate that an `invokedynamic` instruction or a dynamic constant failed to resolve its bootstrap method and arguments, or for `invokedynamic` instruction the bootstrap method has failed to provide a [call site](https://developer.android.com/reference/java/lang/invoke/CallSite) with a [target](https://developer.android.com/reference/java/lang/invoke/CallSite#getTarget()) of the correct [method type](https://developer.android.com/reference/java/lang/invoke/MethodHandle#type()), or for a dynamic constant the bootstrap method has failed to provide a constant value of the required type. [BrokenBarrierException](https://developer.android.com/reference/java/util/concurrent/BrokenBarrierException) Exception thrown when a thread tries to wait upon a barrier that is in a broken state, or which enters the broken state while the thread is waiting. [BufferOverflowException](https://developer.android.com/reference/java/nio/BufferOverflowException) Unchecked exception thrown when a relative *put* operation reaches the target buffer's limit. [BufferUnderflowException](https://developer.android.com/reference/java/nio/BufferUnderflowException) Unchecked exception thrown when a relative *get* operation reaches the source buffer's limit. [CRLException](https://developer.android.com/reference/java/security/cert/CRLException) CRL (Certificate Revocation List) Exception. [CallEndpointException](https://developer.android.com/reference/android/telecom/CallEndpointException) This class represents a set of exceptions that can occur when requesting a `https://developer.android.com/reference/android/telecom/CallEndpoint` change. [CallException](https://developer.android.com/reference/android/telecom/CallException) This class defines exceptions that can be thrown when using Telecom APIs with `https://developer.android.com/reference/android/os/OutcomeReceiver`s. [CallbackException](https://developer.android.com/reference/android/net/http/CallbackException) Exception passed to `https://developer.android.com/reference/android/net/http/UrlRequest.Callback#onFailed(android.net.http.UrlRequest,%20android.net.http.UrlResponseInfo,%20android.net.http.HttpException)` when `https://developer.android.com/reference/android/net/http/UrlRequest.Callback` or `https://developer.android.com/reference/android/net/http/UploadDataProvider` method throws an exception. [CameraAccessException](https://developer.android.com/reference/android/hardware/camera2/CameraAccessException) `CameraAccessException` is thrown if a camera device could not
be queried or opened by the `https://developer.android.com/reference/android/hardware/camera2/CameraManager`, or if the connection to an
opened `https://developer.android.com/reference/android/hardware/camera2/CameraDevice` is no longer valid.


[CancellationException](https://developer.android.com/reference/java/util/concurrent/CancellationException) Exception indicating that the result of a value-producing task, such as a `https://developer.android.com/reference/java/util/concurrent/FutureTask`, cannot be retrieved because the task was cancelled. [CancelledKeyException](https://developer.android.com/reference/java/nio/channels/CancelledKeyException) Unchecked exception thrown when an attempt is made to use a selection key that is no longer valid. [CertPathBuilderException](https://developer.android.com/reference/java/security/cert/CertPathBuilderException) An exception indicating one of a variety of problems encountered when building a certification path with a `CertPathBuilder`. [CertPathValidatorException](https://developer.android.com/reference/java/security/cert/CertPathValidatorException) An exception indicating one of a variety of problems encountered when validating a certification path. [CertStoreException](https://developer.android.com/reference/java/security/cert/CertStoreException) An exception indicating one of a variety of problems retrieving certificates and CRLs from a `CertStore`. [CertificateEncodingException](https://developer.android.com/reference/java/security/cert/CertificateEncodingException) Certificate Encoding Exception. [CertificateException](https://developer.android.com/reference/java/security/cert/CertificateException) This exception indicates one of a variety of certificate problems. [CertificateExpiredException](https://developer.android.com/reference/java/security/cert/CertificateExpiredException) Certificate Expired Exception. [CertificateNotYetValidException](https://developer.android.com/reference/javax/security/cert/CertificateNotYetValidException) Certificate is not yet valid exception. [CertificateParsingException](https://developer.android.com/reference/javax/security/cert/CertificateParsingException) Certificate Parsing Exception. [CertificateRevokedException](https://developer.android.com/reference/java/security/cert/CertificateRevokedException) An exception that indicates an X.509 certificate is revoked. [CharConversionException](https://developer.android.com/reference/java/io/CharConversionException) Base class for character conversion exceptions. [CharacterCodingException](https://developer.android.com/reference/java/nio/charset/CharacterCodingException) Checked exception thrown when a character encoding or decoding error occurs. [CipherSuiteNotSupportedException](https://developer.android.com/reference/android/security/identity/CipherSuiteNotSupportedException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException) Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. [ClassCircularityError](https://developer.android.com/reference/java/lang/ClassCircularityError) Thrown when the Java Virtual Machine detects a circularity in the superclass hierarchy of a class being loaded. [ClassFormatError](https://developer.android.com/reference/java/lang/ClassFormatError) Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. [ClassNotFoundException](https://developer.android.com/reference/java/lang/ClassNotFoundException) Thrown when an application tries to load in a class through its string name using:

- The `forName` method in class `Class`.
[ClearCredentialStateException](https://developer.android.com/reference/android/credentials/ClearCredentialStateException) Represents an error encountered during the `https://developer.android.com/reference/android/credentials/CredentialManager#clearCredentialState(android.credentials.ClearCredentialStateRequest,%20android.os.CancellationSignal,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.credentials.ClearCredentialStateException>)` operation. [CleartextNetworkViolation](https://developer.android.com/reference/android/os/strictmode/CleartextNetworkViolation) [CloneNotSupportedException](https://developer.android.com/reference/java/lang/CloneNotSupportedException) Thrown to indicate that the `clone` method in class `Object` has been called to clone an object, but that the object's class does not implement the `Cloneable` interface. [ClosedByInterruptException](https://developer.android.com/reference/java/nio/channels/ClosedByInterruptException) Checked exception received by a thread when another thread interrupts it while it is blocked in an I/O operation upon a channel. [ClosedChannelException](https://developer.android.com/reference/java/nio/channels/ClosedChannelException) Checked exception thrown when an attempt is made to invoke or complete an I/O operation upon channel that is closed, or at least closed to that operation. [ClosedDirectoryStreamException](https://developer.android.com/reference/java/nio/file/ClosedDirectoryStreamException) Unchecked exception thrown when an attempt is made to invoke an operation on a directory stream that is closed. [ClosedFileSystemException](https://developer.android.com/reference/java/nio/file/ClosedFileSystemException) Unchecked exception thrown when an attempt is made to invoke an operation on a file and the file system is closed. [ClosedSelectorException](https://developer.android.com/reference/java/nio/channels/ClosedSelectorException) Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a closed selector. [ClosedWatchServiceException](https://developer.android.com/reference/java/nio/file/ClosedWatchServiceException) Unchecked exception thrown when an attempt is made to invoke an operation on a watch service that is closed. [CoderMalfunctionError](https://developer.android.com/reference/java/nio/charset/CoderMalfunctionError) Error thrown when the `https://developer.android.com/reference/java/nio/charset/CharsetDecoder#decodeLoop(java.nio.ByteBuffer,%20java.nio.CharBuffer)` method of a `https://developer.android.com/reference/java/nio/charset/CharsetDecoder`, or the `https://developer.android.com/reference/java/nio/charset/CharsetEncoder#encodeLoop(java.nio.CharBuffer,%20java.nio.ByteBuffer)` method of a `https://developer.android.com/reference/java/nio/charset/CharsetEncoder`, throws an unexpected exception. [CompanionException](https://developer.android.com/reference/android/companion/CompanionException) `CompanionException` can be thrown during the companion system data transfer process. [ComparisonFailure](https://developer.android.com/reference/android/test/ComparisonFailure) *This class was deprecated
in API level 16.
use org.junit.ComparisonFailure* [CompletionException](https://developer.android.com/reference/java/util/concurrent/CompletionException) Exception thrown when an error or other exception is encountered in the course of completing a result or task. [ConcurrentModificationException](https://developer.android.com/reference/java/util/ConcurrentModificationException) This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible. [ConfirmationAlreadyPresentingException](https://developer.android.com/reference/android/security/ConfirmationAlreadyPresentingException) This exception is thrown when presenting a prompt fails because another prompt is already being presented. [ConfirmationNotAvailableException](https://developer.android.com/reference/android/security/ConfirmationNotAvailableException) This exception is thrown when presenting a prompt fails because the environment lacks facilities for showing confirmations. [ConnectException](https://developer.android.com/reference/java/net/ConnectException) Signals that an error occurred while attempting to connect a socket to a remote address and port. [ConnectTimeoutException](https://developer.android.com/reference/org/apache/http/conn/ConnectTimeoutException) *This class was deprecated
in API level 22.
Please use `https://developer.android.com/reference/java/net/URL#openConnection()` instead.
Please visit [this webpage](http://android-developers.blogspot.com/2011/09/androids-http-clients.html)
for further details.* [ConnectionPendingException](https://developer.android.com/reference/java/nio/channels/ConnectionPendingException) Unchecked exception thrown when an attempt is made to connect a `https://developer.android.com/reference/java/nio/channels/SocketChannel` for which a non-blocking connection operation is already in progress. [ContentUriWithoutPermissionViolation](https://developer.android.com/reference/android/os/strictmode/ContentUriWithoutPermissionViolation) [CreateCredentialException](https://developer.android.com/reference/android/credentials/CreateCredentialException) Represents an error encountered during the `https://developer.android.com/reference/android/credentials/CredentialManager#createCredential(android.content.Context,%20android.credentials.CreateCredentialRequest,%20android.os.CancellationSignal,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.credentials.CreateCredentialResponse,android.credentials.CreateCredentialException>)` operation. [CredentialProtectedWhileLockedViolation](https://developer.android.com/reference/android/os/strictmode/CredentialProtectedWhileLockedViolation) Subclass of `Violation` that is used when a process accesses filesystem paths stored in credential protected storage areas while the user is locked. [CrossDeviceAuthenticationException](https://developer.android.com/reference/android/security/authenticationpolicy/CrossDeviceAuthenticationException) Exception thrown when cross-device authentication fails. [CursorIndexOutOfBoundsException](https://developer.android.com/reference/android/database/CursorIndexOutOfBoundsException) An exception indicating that a cursor is out of bounds. [CursorWindowAllocationException](https://developer.android.com/reference/android/database/CursorWindowAllocationException) This exception is thrown when a CursorWindow couldn't be allocated, most probably due to memory not being available. [CustomViolation](https://developer.android.com/reference/android/os/strictmode/CustomViolation) [DOMException](https://developer.android.com/reference/org/w3c/dom/DOMException) DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable). [DataFormatException](https://developer.android.com/reference/java/util/zip/DataFormatException) Signals that a data format error has occurred. [DataTruncation](https://developer.android.com/reference/java/sql/DataTruncation) An exception thrown as a `DataTruncation` exception (on writes) or reported as a `DataTruncation` warning (on reads) when a data values is unexpectedly truncated for reasons other than its having execeeded `MaxFieldSize`. [DatatypeConfigurationException](https://developer.android.com/reference/javax/xml/datatype/DatatypeConfigurationException) Indicates a serious configuration error.


[DateTimeException](https://developer.android.com/reference/java/time/DateTimeException) Exception used to indicate a problem while calculating a date-time. [DateTimeParseException](https://developer.android.com/reference/java/time/format/DateTimeParseException) An exception thrown when an error occurs during parsing. [DeadObjectException](https://developer.android.com/reference/android/os/DeadObjectException) The object you are calling has died, because its hosting process no longer exists, or there has been a low-level binder error. [DeadSystemException](https://developer.android.com/reference/android/os/DeadSystemException) The core Android system has died and is going through a runtime restart. [DeniedByServerException](https://developer.android.com/reference/android/media/DeniedByServerException) Exception thrown when the provisioning server or key server denies a certficate or license for a device. [DestroyFailedException](https://developer.android.com/reference/javax/security/auth/DestroyFailedException) Signals that a `destroy` operation failed. [DeviceNotAssociatedException](https://developer.android.com/reference/android/companion/DeviceNotAssociatedException) An exception for a case when a given device was not `https://developer.android.com/reference/android/companion/CompanionDeviceManager#associate(android.companion.AssociationRequest,%20android.companion.CompanionDeviceManager.Callback,%20android.os.Handler)` to the calling app. [DigestException](https://developer.android.com/reference/java/security/DigestException) This is the generic Message Digest exception. [DirectoryIteratorException](https://developer.android.com/reference/java/nio/file/DirectoryIteratorException) Runtime exception thrown if an I/O error is encountered when iterating over the entries in a directory. [DirectoryNotEmptyException](https://developer.android.com/reference/java/nio/file/DirectoryNotEmptyException) Checked exception thrown when a file system operation fails because a directory is not empty. [DiskReadViolation](https://developer.android.com/reference/android/os/strictmode/DiskReadViolation) [DiskWriteViolation](https://developer.android.com/reference/android/os/strictmode/DiskWriteViolation) [DnsResolver.DnsException](https://developer.android.com/reference/android/net/DnsResolver.DnsException) Class to represent DNS error [DocTypeNotSupportedException](https://developer.android.com/reference/android/security/identity/DocTypeNotSupportedException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [DuplicateFormatFlagsException](https://developer.android.com/reference/java/util/DuplicateFormatFlagsException) Unchecked exception thrown when duplicate flags are provided in the format specifier. [EOFException](https://developer.android.com/reference/java/io/EOFException) Signals that an end of file or end of stream has been reached unexpectedly during input. [EchConfigMismatchException](https://developer.android.com/reference/android/net/ssl/EchConfigMismatchException) Exception thrown when the provided ECH (Encrypted Client Hello) config does not match the server. [EmptyStackException](https://developer.android.com/reference/java/util/EmptyStackException) Thrown by methods in the `Stack` class to indicate that the stack is empty. [EnumConstantNotPresentException](https://developer.android.com/reference/java/lang/EnumConstantNotPresentException) Thrown when an application tries to access an enum constant by name and the enum type contains no constant with the specified name. [EphemeralPublicKeyNotFoundException](https://developer.android.com/reference/android/security/identity/EphemeralPublicKeyNotFoundException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [ErrnoException](https://developer.android.com/reference/android/system/ErrnoException) A checked exception thrown when `https://developer.android.com/reference/android/system/Os` methods fail. [ExceptionInInitializerError](https://developer.android.com/reference/java/lang/ExceptionInInitializerError) Signals that an unexpected exception has occurred in a static initializer. [ExecutionException](https://developer.android.com/reference/java/util/concurrent/ExecutionException) Exception thrown when attempting to retrieve the result of a task that aborted by throwing an exception. [ExemptionMechanismException](https://developer.android.com/reference/javax/crypto/ExemptionMechanismException) This is the generic ExemptionMechanism exception. [ExplicitGcViolation](https://developer.android.com/reference/android/os/strictmode/ExplicitGcViolation) See #`https://developer.android.com/reference/android/os/StrictMode.ThreadPolicy.Builder#detectExplicitGc()`. [FactoryConfigurationError](https://developer.android.com/reference/javax/xml/parsers/FactoryConfigurationError) Thrown when a problem with configuration with the Parser Factories exists. [FileAlreadyExistsException](https://developer.android.com/reference/java/nio/file/FileAlreadyExistsException) Checked exception thrown when an attempt is made to create a file or directory and a file of that name already exists. [FileLockInterruptionException](https://developer.android.com/reference/java/nio/channels/FileLockInterruptionException) Checked exception received by a thread when another thread interrupts it while it is waiting to acquire a file lock. [FileNotFoundException](https://developer.android.com/reference/java/io/FileNotFoundException) Signals that an attempt to open the file denoted by a specified pathname has failed. [FileSystemAlreadyExistsException](https://developer.android.com/reference/java/nio/file/FileSystemAlreadyExistsException) Runtime exception thrown when an attempt is made to create a file system that already exists. [FileSystemException](https://developer.android.com/reference/java/nio/file/FileSystemException) Thrown when a file system operation fails on one or two files. [FileSystemLoopException](https://developer.android.com/reference/java/nio/file/FileSystemLoopException) Checked exception thrown when a file system loop, or cycle, is encountered. [FileSystemNotFoundException](https://developer.android.com/reference/java/nio/file/FileSystemNotFoundException) Runtime exception thrown when a file system cannot be found. [FileUriExposedException](https://developer.android.com/reference/android/os/FileUriExposedException) The exception that may be thrown when an application exposes a `file://` `https://developer.android.com/reference/android/net/Uri` to another app. [FileUriExposedViolation](https://developer.android.com/reference/android/os/strictmode/FileUriExposedViolation) [ForegroundServiceStartNotAllowedException](https://developer.android.com/reference/android/app/ForegroundServiceStartNotAllowedException) Exception thrown when an app tries to start a foreground `https://developer.android.com/reference/android/app/Service` when it's not allowed to do so. [ForegroundServiceTypeException](https://developer.android.com/reference/android/app/ForegroundServiceTypeException) Base exception thrown when an app tries to start a foreground `https://developer.android.com/reference/android/app/Service` without a valid type. [FormatException](https://developer.android.com/reference/android/nfc/FormatException) [FormatFlagsConversionMismatchException](https://developer.android.com/reference/java/util/FormatFlagsConversionMismatchException) Unchecked exception thrown when a conversion and flag are incompatible. [FormatterClosedException](https://developer.android.com/reference/java/util/FormatterClosedException) Unchecked exception thrown when the formatter has been closed. [Fragment.InstantiationException](https://developer.android.com/reference/android/app/Fragment.InstantiationException) *This class was deprecated
in API level 28.
Use `https://developer.android.com/reference/androidx/fragment/app/Fragment.InstantiationException.html`* [GLException](https://developer.android.com/reference/android/opengl/GLException) An exception class for OpenGL errors. [GeneralSecurityException](https://developer.android.com/reference/java/security/GeneralSecurityException) The `GeneralSecurityException` class is a generic security exception class that provides type safety for all the security-related exception classes that extend from it. [GenericSignatureFormatError](https://developer.android.com/reference/java/lang/reflect/GenericSignatureFormatError) Thrown when a syntactically malformed signature attribute is encountered by a reflective method that needs to interpret the generic signature information for a type, method or constructor. [GetCredentialException](https://developer.android.com/reference/android/credentials/GetCredentialException) Represents an error encountered during the `https://developer.android.com/reference/android/credentials/CredentialManager#getCredential(android.content.Context,%20android.credentials.GetCredentialRequest,%20android.os.CancellationSignal,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.credentials.GetCredentialResponse,android.credentials.GetCredentialException>)` operation. [HealthConnectException](https://developer.android.com/reference/android/health/connect/HealthConnectException) Class representing health connect exceptions. [HttpException](https://developer.android.com/reference/android/net/http/HttpException) Base exception passed to `https://developer.android.com/reference/android/net/http/UrlRequest.Callback#onFailed(android.net.http.UrlRequest,%20android.net.http.UrlResponseInfo,%20android.net.http.HttpException)`. [HttpRetryException](https://developer.android.com/reference/java/net/HttpRetryException) Thrown to indicate that a HTTP request needs to be retried but cannot be retried automatically, due to streaming mode being enabled. [ICUUncheckedIOException](https://developer.android.com/reference/android/icu/util/ICUUncheckedIOException) Unchecked version of `https://developer.android.com/reference/java/io/IOException`. [IOError](https://developer.android.com/reference/java/io/IOError) Thrown when a serious I/O error has occurred. [IOException](https://developer.android.com/reference/java/io/IOException) Signals that an I/O exception of some sort has occurred. [IdentityCredentialException](https://developer.android.com/reference/android/security/identity/IdentityCredentialException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [IkeException](https://developer.android.com/reference/android/net/ipsec/ike/exceptions/IkeException) IkeException represents a generic exception that includes internal and protocol exceptions. [IkeIOException](https://developer.android.com/reference/android/net/ipsec/ike/exceptions/IkeIOException) Wrapper for I/O exceptions encountered during IKE operations. [IkeInternalException](https://developer.android.com/reference/android/net/ipsec/ike/exceptions/IkeInternalException) IkeInternalException encapsulates all local implementation or resource related exceptions. [IkeNetworkLostException](https://developer.android.com/reference/android/net/ipsec/ike/exceptions/IkeNetworkLostException) IkeNetworkLostException is returned to the caller via `https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionCallback#onError(android.net.ipsec.ike.exceptions.IkeException)` if the underlying Network for the `https://developer.android.com/reference/android/net/ipsec/ike/IkeSession` was lost with no alternatives. [IkeNonProtocolException](https://developer.android.com/reference/android/net/ipsec/ike/exceptions/IkeNonProtocolException) IkeNonProtocolException encapsulates all implementation-specific non-protocol IKE errors. [IkeProtocolException](https://developer.android.com/reference/android/net/ipsec/ike/exceptions/IkeProtocolException) IkeProtocolException is an abstract class that represents the common information for all IKE protocol errors. [IkeTimeoutException](https://developer.android.com/reference/android/net/ipsec/ike/exceptions/IkeTimeoutException) This exception is thrown when there is an IKE retransmission timeout. [IllegalAccessError](https://developer.android.com/reference/java/lang/IllegalAccessError) Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to. [IllegalAccessException](https://developer.android.com/reference/java/lang/IllegalAccessException) An IllegalAccessException is thrown when an application tries to reflectively create an instance (other than an array), set or get a field, or invoke a method, but the currently executing method does not have access to the definition of the specified class, field, method or constructor. [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) Thrown to indicate that a method has been passed an illegal or inappropriate argument. [IllegalBlockSizeException](https://developer.android.com/reference/javax/crypto/IllegalBlockSizeException) This exception is thrown when the length of data provided to a block cipher is incorrect, i.e., does not match the block size of the cipher. [IllegalBlockingModeException](https://developer.android.com/reference/java/nio/channels/IllegalBlockingModeException) Unchecked exception thrown when a blocking-mode-specific operation is invoked upon a channel in the incorrect blocking mode. [IllegalCallerException](https://developer.android.com/reference/java/lang/IllegalCallerException) Thrown to indicate that a method has been called by an inappropriate caller. [IllegalChannelGroupException](https://developer.android.com/reference/java/nio/channels/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](https://developer.android.com/reference/java/nio/charset/IllegalCharsetNameException) Unchecked exception thrown when a string that is not a [legal charset name](https://developer.android.com/reference/java/lang/Charset#names) is used as such. [IllegalFormatCodePointException](https://developer.android.com/reference/java/util/IllegalFormatCodePointException) Unchecked exception thrown when a character with an invalid Unicode code point as defined by `https://developer.android.com/reference/java/lang/Character#isValidCodePoint(int)` is passed to the `https://developer.android.com/reference/java/util/Formatter`. [IllegalFormatConversionException](https://developer.android.com/reference/java/util/IllegalFormatConversionException) Unchecked exception thrown when the argument corresponding to the format specifier is of an incompatible type. [IllegalFormatException](https://developer.android.com/reference/java/util/IllegalFormatException) Unchecked exception thrown when a format string contains an illegal syntax or a format specifier that is incompatible with the given arguments. [IllegalFormatFlagsException](https://developer.android.com/reference/java/util/IllegalFormatFlagsException) Unchecked exception thrown when an illegal combination flags is given. [IllegalFormatPrecisionException](https://developer.android.com/reference/java/util/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](https://developer.android.com/reference/java/util/IllegalFormatWidthException) Unchecked exception thrown when the format width is a negative value other than `-1` or is otherwise unsupported. [IllegalMonitorStateException](https://developer.android.com/reference/java/lang/IllegalMonitorStateException) Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor. [IllegalSelectorException](https://developer.android.com/reference/java/nio/channels/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. [IllegalStateException](https://developer.android.com/reference/java/lang/IllegalStateException) Signals that a method has been invoked at an illegal or inappropriate time. [IllegalThreadStateException](https://developer.android.com/reference/java/lang/IllegalThreadStateException) Thrown to indicate that a thread is not in an appropriate state for the requested operation. [IllformedLocaleException](https://developer.android.com/reference/java/util/IllformedLocaleException) Thrown by methods in `https://developer.android.com/reference/java/util/Locale` and `https://developer.android.com/reference/java/util/Locale.Builder` to indicate that an argument is not a well-formed BCP 47 tag. [ImageDecoder.DecodeException](https://developer.android.com/reference/android/graphics/ImageDecoder.DecodeException) Information about an interrupted decode. [ImplicitDirectBootViolation](https://developer.android.com/reference/android/os/strictmode/ImplicitDirectBootViolation) Subclass of `Violation` that is used when a process implicitly relies on automatic Direct Boot filtering. [ImsException](https://developer.android.com/reference/android/telephony/ims/ImsException) This class defines an IMS-related exception that has been thrown while interacting with a device or carrier provided ImsService implementation. [IncompatibleClassChangeError](https://developer.android.com/reference/java/lang/IncompatibleClassChangeError) Thrown when an incompatible class change has occurred to some class definition. [IncompleteAnnotationException](https://developer.android.com/reference/java/lang/annotation/IncompleteAnnotationException) Thrown to indicate that a program has attempted to access an element of an annotation interface that was added to the annotation interface definition after the annotation was compiled (or serialized). [IncorrectContextUseViolation](https://developer.android.com/reference/android/os/strictmode/IncorrectContextUseViolation) Incorrect usage of `https://developer.android.com/reference/android/content/Context`, such as obtaining a UI service from non-UI `https://developer.android.com/reference/android/content/Context` instance. [IndexOutOfBoundsException](https://developer.android.com/reference/java/lang/IndexOutOfBoundsException) Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range. [InfeasibleActivityOptionsException](https://developer.android.com/reference/android/app/InfeasibleActivityOptionsException) This exception is thrown when a call to `https://developer.android.com/reference/android/content/Context#startActivity(android.content.Intent)` or one of its variants fails because it is not possible to satisfy requirements specified in the `https://developer.android.com/reference/android/app/ActivityOptions` passed in the `https://developer.android.com/reference/android/content/Context#startActivity(android.content.Intent)` call. [InflateException](https://developer.android.com/reference/android/view/InflateException) This exception is thrown by an inflater on error conditions. [InlineExecutionProhibitedException](https://developer.android.com/reference/android/net/http/InlineExecutionProhibitedException) Thrown when an executor runs a submitted runnable inline in `https://developer.android.com/reference/java/util/concurrent/Executor#execute(java.lang.Runnable)` and `https://developer.android.com/reference/android/net/http/UrlRequest.Builder#setDirectExecutorAllowed(boolean)` was not called. [InputMismatchException](https://developer.android.com/reference/java/util/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. [InspectionCompanion.UninitializedPropertyMapException](https://developer.android.com/reference/android/view/inspector/InspectionCompanion.UninitializedPropertyMapException) Thrown by `https://developer.android.com/reference/android/view/inspector/InspectionCompanion#readProperties(T,%20android.view.inspector.PropertyReader)` if called before `https://developer.android.com/reference/android/view/inspector/InspectionCompanion#mapProperties(android.view.inspector.PropertyMapper)`. [InstanceCountViolation](https://developer.android.com/reference/android/os/strictmode/InstanceCountViolation) [InstantiationError](https://developer.android.com/reference/java/lang/InstantiationError) Thrown when an application tries to use the Java `new` construct to instantiate an abstract class or an interface. [InstantiationException](https://developer.android.com/reference/java/lang/InstantiationException) Thrown when an application tries to create an instance of a class using the `newInstance` method in class `Class`, but the specified class object cannot be instantiated. [IntentFilter.MalformedMimeTypeException](https://developer.android.com/reference/android/content/IntentFilter.MalformedMimeTypeException) This exception is thrown when a given MIME type does not have a valid syntax. [IntentReceiverLeakedViolation](https://developer.android.com/reference/android/os/strictmode/IntentReceiverLeakedViolation) [IntentSender.SendIntentException](https://developer.android.com/reference/android/content/IntentSender.SendIntentException) Exception thrown when trying to send through a PendingIntent that has been canceled or is otherwise no longer able to execute the request. [InternalError](https://developer.android.com/reference/java/lang/InternalError) Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine. [InterruptedByTimeoutException](https://developer.android.com/reference/java/nio/channels/InterruptedByTimeoutException) Checked exception received by a thread when a timeout elapses before an asynchronous operation completes. [InterruptedException](https://developer.android.com/reference/java/lang/InterruptedException) Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity. [InterruptedIOException](https://developer.android.com/reference/java/io/InterruptedIOException) Signals that an I/O operation has been interrupted. [InvalidAlgorithmParameterException](https://developer.android.com/reference/java/security/InvalidAlgorithmParameterException) This is the exception for invalid or inappropriate algorithm parameters. [InvalidClassException](https://developer.android.com/reference/java/io/InvalidClassException) Thrown when the Serialization runtime detects one of the following problems with a Class. [InvalidEchDataException](https://developer.android.com/reference/android/net/ssl/InvalidEchDataException) Exception thrown when the ECH (Encrypted Client Hello) data is empty or invalid. [InvalidForegroundServiceTypeException](https://developer.android.com/reference/android/app/InvalidForegroundServiceTypeException) Exception thrown when an app tries to start a foreground `https://developer.android.com/reference/android/app/Service` with an invalid type. [InvalidKeException](https://developer.android.com/reference/android/net/ipsec/ike/exceptions/InvalidKeException) This exception is thrown when the remote server expected a different Diffie-Hellman group. [InvalidKeyException](https://developer.android.com/reference/java/security/InvalidKeyException) This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc). [InvalidKeySpecException](https://developer.android.com/reference/java/security/spec/InvalidKeySpecException) This is the exception for invalid key specifications. [InvalidMajorVersionException](https://developer.android.com/reference/android/net/ipsec/ike/exceptions/InvalidMajorVersionException) This exception is thrown when major version of an inbound message is higher than 2. [InvalidMarkException](https://developer.android.com/reference/java/nio/InvalidMarkException) Unchecked exception thrown when an attempt is made to reset a buffer when its mark is not defined. [InvalidObjectException](https://developer.android.com/reference/java/io/InvalidObjectException) Indicates that one or more deserialized objects failed validation tests. [InvalidParameterException](https://developer.android.com/reference/java/security/InvalidParameterException) This exception, designed for use by the JCA/JCE engine classes, is thrown when an invalid parameter is passed to a method. [InvalidParameterSpecException](https://developer.android.com/reference/java/security/spec/InvalidParameterSpecException) This is the exception for invalid parameter specifications. [InvalidPathException](https://developer.android.com/reference/java/nio/file/InvalidPathException) Unchecked exception thrown when path string cannot be converted into a `https://developer.android.com/reference/java/nio/file/Path` because the path string contains invalid characters, or the path string is invalid for other file system specific reasons. [InvalidPreferencesFormatException](https://developer.android.com/reference/java/util/prefs/InvalidPreferencesFormatException) Thrown to indicate that an operation could not complete because the input did not conform to the appropriate XML document type for a collection of preferences, as per the `https://developer.android.com/reference/java/util/prefs/Preferences` specification. [InvalidPropertiesFormatException](https://developer.android.com/reference/java/util/InvalidPropertiesFormatException) Thrown to indicate that an operation could not complete because the input did not conform to the appropriate XML document type for a collection of properties, as per the `https://developer.android.com/reference/java/util/Properties` specification. [InvalidReaderSignatureException](https://developer.android.com/reference/android/security/identity/InvalidReaderSignatureException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [InvalidRequestMessageException](https://developer.android.com/reference/android/security/identity/InvalidRequestMessageException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [InvalidSelectorsException](https://developer.android.com/reference/android/net/ipsec/ike/exceptions/InvalidSelectorsException) This exception is thrown if the remote server received an IPsec packet with mismatched selectors. [InvocationTargetException](https://developer.android.com/reference/java/lang/reflect/InvocationTargetException) InvocationTargetException is a checked exception that wraps an exception thrown by an invoked method or constructor. [IpSecManager.ResourceUnavailableException](https://developer.android.com/reference/android/net/IpSecManager.ResourceUnavailableException) Thrown to indicate that an IPsec resource is unavailable. [IpSecManager.SpiUnavailableException](https://developer.android.com/reference/android/net/IpSecManager.SpiUnavailableException) Thrown to indicate that a requested SPI is in use. [IsolatedServiceException](https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedServiceException) *This class was deprecated
in API level 37.
The ODP APIs are deprecated and will not be supported in future Android releases.
There is no direct replacement API available. Developers currently integrated with these APIs
must cease further integration efforts. For comprehensive details regarding this deprecation and
the future roadmap of Privacy Sandbox on Android, please consult the official Privacy Sandbox
developer documentation and announcements:
<https://privacysandbox.google.com>* [JSONException](https://developer.android.com/reference/org/json/JSONException) Thrown to indicate a problem with the JSON API. [JarException](https://developer.android.com/reference/java/util/jar/JarException) Signals that an error of some sort has occurred while reading from or writing to a JAR file. [KeyChainException](https://developer.android.com/reference/android/security/KeyChainException) Thrown on problems accessing the `https://developer.android.com/reference/android/security/KeyChain`. [KeyCharacterMap.UnavailableException](https://developer.android.com/reference/android/view/KeyCharacterMap.UnavailableException) Thrown by `https://developer.android.com/reference/android/view/KeyCharacterMap#load(int)` when a key character map could not be loaded. [KeyException](https://developer.android.com/reference/java/security/KeyException) This is the basic key exception. [KeyExpiredException](https://developer.android.com/reference/android/security/keystore/KeyExpiredException) Indicates that a cryptographic operation failed because the employed key's validity end date is in the past. [KeyManagementException](https://developer.android.com/reference/java/security/KeyManagementException) This is the general key management exception for all operations dealing with key management. [KeyNotYetValidException](https://developer.android.com/reference/android/security/keystore/KeyNotYetValidException) Indicates that a cryptographic operation failed because the employed key's validity start date is in the future. [KeyPermanentlyInvalidatedException](https://developer.android.com/reference/android/security/keystore/KeyPermanentlyInvalidatedException) Indicates that the key can no longer be used because it has been permanently invalidated. [KeyStoreException](https://developer.android.com/reference/android/security/KeyStoreException) Exception containing information about the failure at the Keystore / KeyMint layer while generating or using a key. [LSException](https://developer.android.com/reference/org/w3c/dom/ls/LSException) Parser or write operations may throw an `LSException` if the processing is stopped. [LambdaConversionException](https://developer.android.com/reference/java/lang/invoke/LambdaConversionException) LambdaConversionException [LastOwnerException](https://developer.android.com/reference/java/security/acl/LastOwnerException) *This class was deprecated
in API level 33.
This class is deprecated and subject to removal in a future
version of Java SE. It has been replaced by `java.security.Policy`
and related classes since 1.2.* [LeakedClosableViolation](https://developer.android.com/reference/android/os/strictmode/LeakedClosableViolation) [LimitExceededException](https://developer.android.com/reference/android/os/LimitExceededException) Indicates that the app has exceeded a limit set by the System. [LinkageError](https://developer.android.com/reference/java/lang/LinkageError) Subclasses of `LinkageError` indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class. [LoadSdkException](https://developer.android.com/reference/android/app/sdksandbox/LoadSdkException) *This class was deprecated
in API level 37.
The SDK sandbox is no longer supported.* [LoginException](https://developer.android.com/reference/javax/security/auth/login/LoginException) This is the basic login exception. [MalformedInputException](https://developer.android.com/reference/java/nio/charset/MalformedInputException) Checked exception thrown when an input byte sequence is not legal for given charset, or an input character sequence is not a legal sixteen-bit Unicode sequence. [MalformedJsonException](https://developer.android.com/reference/android/util/MalformedJsonException) Thrown when a reader encounters malformed JSON. [MalformedParameterizedTypeException](https://developer.android.com/reference/java/lang/reflect/MalformedParameterizedTypeException) Thrown when a semantically malformed parameterized type is encountered by a reflective method that needs to instantiate it. [MalformedParametersException](https://developer.android.com/reference/java/lang/reflect/MalformedParametersException) Thrown when `https://developer.android.com/reference/java/lang/reflect/Executable#getParameters()` attempts to read method parameters from a class file and determines that one or more parameters are malformed. [MalformedURLException](https://developer.android.com/reference/java/net/MalformedURLException) Thrown to indicate that a malformed URL has occurred. [MatchException](https://developer.android.com/reference/java/lang/MatchException) Thrown to indicate an unexpected failure in pattern matching. [MediaCasException](https://developer.android.com/reference/android/media/MediaCasException) Base class for MediaCas exceptions [MediaCasException.DeniedByServerException](https://developer.android.com/reference/android/media/MediaCasException.DeniedByServerException) Exception thrown when the provisioning server or key server denies a license for a device. [MediaCasException.InsufficientResourceException](https://developer.android.com/reference/android/media/MediaCasException.InsufficientResourceException) Exception thrown when an operation on a MediaCas object is attempted and hardware resources are not sufficient to allocate, due to client's lower priority. [MediaCasException.NotProvisionedException](https://developer.android.com/reference/android/media/MediaCasException.NotProvisionedException) Exception thrown when an operation on a MediaCas object is attempted before it's provisioned successfully. [MediaCasException.ResourceBusyException](https://developer.android.com/reference/android/media/MediaCasException.ResourceBusyException) Exception thrown when an operation on a MediaCas object is attempted and hardware resources are not available, due to being in use. [MediaCasException.UnsupportedCasException](https://developer.android.com/reference/android/media/MediaCasException.UnsupportedCasException) Exception thrown when an attempt is made to construct a MediaCas object using a CA_system_id that is not supported by the device [MediaCasStateException](https://developer.android.com/reference/android/media/MediaCasStateException) Base class for MediaCas runtime exceptions [MediaCodec.CodecException](https://developer.android.com/reference/android/media/MediaCodec.CodecException) Thrown when an internal codec error occurs. [MediaCodec.CryptoException](https://developer.android.com/reference/android/media/MediaCodec.CryptoException) Thrown when a crypto error occurs while queueing a secure input buffer. [MediaCodec.IncompatibleWithBlockModelException](https://developer.android.com/reference/android/media/MediaCodec.IncompatibleWithBlockModelException) Thrown when the codec is configured for block model and an incompatible API is called. [MediaCodec.InvalidBufferFlagsException](https://developer.android.com/reference/android/media/MediaCodec.InvalidBufferFlagsException) Thrown when a buffer is marked with an invalid combination of flags (e.g. both `https://developer.android.com/reference/android/media/MediaCodec#BUFFER_FLAG_END_OF_STREAM` and `https://developer.android.com/reference/android/media/MediaCodec#BUFFER_FLAG_DECODE_ONLY`) [MediaCryptoException](https://developer.android.com/reference/android/media/MediaCryptoException) Exception thrown if MediaCrypto object could not be instantiated or if unable to perform an operation on the MediaCrypto object. [MediaDrm.MediaDrmStateException](https://developer.android.com/reference/android/media/MediaDrm.MediaDrmStateException) Thrown when a general failure occurs during a MediaDrm operation. [MediaDrm.SessionException](https://developer.android.com/reference/android/media/MediaDrm.SessionException) `https://developer.android.com/reference/android/media/MediaDrm.SessionException` is a misnomer because it may occur in methods **without** a session context. [MediaDrmException](https://developer.android.com/reference/android/media/MediaDrmException) Base class for MediaDrm exceptions [MediaDrmResetException](https://developer.android.com/reference/android/media/MediaDrmResetException) This exception is thrown when the MediaDrm instance has become unusable due to a restart of the mediaserver process. [MediaParser.ParsingException](https://developer.android.com/reference/android/media/MediaParser.ParsingException) Thrown when an error occurs while parsing a media stream. [MediaParser.UnrecognizedInputFormatException](https://developer.android.com/reference/android/media/MediaParser.UnrecognizedInputFormatException) Thrown if all parser implementations provided to `https://developer.android.com/reference/android/media/MediaParser#create(android.media.MediaParser.OutputConsumer,%20java.lang.String[])` failed to sniff the input content. [MediaPlayer.NoDrmSchemeException](https://developer.android.com/reference/android/media/MediaPlayer.NoDrmSchemeException) Thrown when a DRM method is called before preparing a DRM scheme through prepareDrm(). [MediaPlayer.ProvisioningNetworkErrorException](https://developer.android.com/reference/android/media/MediaPlayer.ProvisioningNetworkErrorException) Thrown when the device requires DRM provisioning but the provisioning attempt has failed due to a network error (Internet reachability, timeout, etc.). [MediaPlayer.ProvisioningServerErrorException](https://developer.android.com/reference/android/media/MediaPlayer.ProvisioningServerErrorException) Thrown when the device requires DRM provisioning but the provisioning attempt has failed due to the provisioning server denying the request. [MessageDecryptionException](https://developer.android.com/reference/android/security/identity/MessageDecryptionException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [MigrationException](https://developer.android.com/reference/android/app/privatecompute/MigrationException) Exception thrown when a migration request fails. [MissingForegroundServiceTypeException](https://developer.android.com/reference/android/app/MissingForegroundServiceTypeException) Exception thrown when an app tries to start a foreground `https://developer.android.com/reference/android/app/Service` without a type. [MissingFormatArgumentException](https://developer.android.com/reference/java/util/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](https://developer.android.com/reference/java/util/MissingFormatWidthException) Unchecked exception thrown when the format width is required. [MissingResourceException](https://developer.android.com/reference/java/util/MissingResourceException) Signals that a resource is missing. [NegativeArraySizeException](https://developer.android.com/reference/java/lang/NegativeArraySizeException) Thrown if an application tries to create an array with negative size. [NetworkErrorException](https://developer.android.com/reference/android/accounts/NetworkErrorException) [NetworkException](https://developer.android.com/reference/android/net/http/NetworkException) Exception passed to `https://developer.android.com/reference/android/net/http/UrlRequest.Callback#onFailed(android.net.http.UrlRequest,%20android.net.http.UrlResponseInfo,%20android.net.http.HttpException)` when the HTTP stack fails to process a network request. [NetworkOnMainThreadException](https://developer.android.com/reference/android/os/NetworkOnMainThreadException) The exception that is thrown when an application attempts to perform a networking operation on its main thread. [NetworkViolation](https://developer.android.com/reference/android/os/strictmode/NetworkViolation) [NoAuthenticationKeyAvailableException](https://developer.android.com/reference/android/security/identity/NoAuthenticationKeyAvailableException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [NoClassDefFoundError](https://developer.android.com/reference/java/lang/NoClassDefFoundError) Thrown if the Java Virtual Machine or a `ClassLoader` instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the `new` expression) and no definition of the class could be found. [NoConnectionPendingException](https://developer.android.com/reference/java/nio/channels/NoConnectionPendingException) Unchecked exception thrown when the `https://developer.android.com/reference/java/nio/channels/SocketChannel#finishConnect()` method of a `https://developer.android.com/reference/java/nio/channels/SocketChannel` is invoked without first successfully invoking its `https://developer.android.com/reference/java/nio/channels/SocketChannel#connect(java.net.SocketAddress)` method. [NoRouteToHostException](https://developer.android.com/reference/java/net/NoRouteToHostException) Signals that an error occurred while attempting to connect a socket to a remote address and port. [NoSuchAlgorithmException](https://developer.android.com/reference/java/security/NoSuchAlgorithmException) This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment. [NoSuchElementException](https://developer.android.com/reference/java/util/NoSuchElementException) Thrown by various accessor methods to indicate that the element being requested does not exist. [NoSuchFieldError](https://developer.android.com/reference/java/lang/NoSuchFieldError) Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field. [NoSuchFieldException](https://developer.android.com/reference/java/lang/NoSuchFieldException) Signals that the class doesn't have a field of a specified name. [NoSuchFileException](https://developer.android.com/reference/java/nio/file/NoSuchFileException) Checked exception thrown when an attempt is made to access a file that does not exist. [NoSuchMethodError](https://developer.android.com/reference/java/lang/NoSuchMethodError) Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method. [NoSuchMethodException](https://developer.android.com/reference/java/lang/NoSuchMethodException) Thrown when a particular method cannot be found. [NoSuchPaddingException](https://developer.android.com/reference/javax/crypto/NoSuchPaddingException) This exception is thrown when a particular padding mechanism is requested but is not available in the environment. [NoSuchPropertyException](https://developer.android.com/reference/android/util/NoSuchPropertyException) Thrown when code requests a `https://developer.android.com/reference/android/util/Property` on a class that does not expose the appropriate method or field. [NoSuchProviderException](https://developer.android.com/reference/java/security/NoSuchProviderException) This exception is thrown when a particular security provider is requested but is not available in the environment. [NonReadableChannelException](https://developer.android.com/reference/java/nio/channels/NonReadableChannelException) Unchecked exception thrown when an attempt is made to read from a channel that was not originally opened for reading. [NonSdkApiUsedViolation](https://developer.android.com/reference/android/os/strictmode/NonSdkApiUsedViolation) Subclass of `Violation` that is used when a process accesses a non SDK API. [NonWritableChannelException](https://developer.android.com/reference/java/nio/channels/NonWritableChannelException) Unchecked exception thrown when an attempt is made to write to a channel that was not originally opened for writing. [NotActiveException](https://developer.android.com/reference/java/io/NotActiveException) Thrown when serialization or deserialization is not active. [NotDirectoryException](https://developer.android.com/reference/java/nio/file/NotDirectoryException) Checked exception thrown when a file system operation, intended for a directory, fails because the file is not a directory. [NotLinkException](https://developer.android.com/reference/java/nio/file/NotLinkException) Checked exception thrown when a file system operation fails because a file is not a symbolic link. [NotOwnerException](https://developer.android.com/reference/java/security/acl/NotOwnerException) *This class was deprecated
in API level 33.
This class is deprecated and subject to removal in a future
version of Java SE. It has been replaced by `java.security.Policy`
and related classes since 1.2.* [NotProvisionedException](https://developer.android.com/reference/android/media/NotProvisionedException) Exception thrown when an operation on a MediaDrm object is attempted and the device does not have a certificate. [NotSerializableException](https://developer.android.com/reference/java/io/NotSerializableException) Thrown when an instance is required to have a Serializable interface. [NotYetBoundException](https://developer.android.com/reference/java/nio/channels/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](https://developer.android.com/reference/java/nio/channels/NotYetConnectedException) Unchecked exception thrown when an attempt is made to invoke an I/O operation upon a socket channel that is not yet connected. [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) Thrown when an application attempts to use `null` in a case where an object is required. [NumberFormatException](https://developer.android.com/reference/java/lang/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. [ObjectStreamException](https://developer.android.com/reference/java/io/ObjectStreamException) Superclass of all exceptions specific to Object Stream classes. [OnDevicePersonalizationException](https://developer.android.com/reference/android/adservices/ondevicepersonalization/OnDevicePersonalizationException) *This class was deprecated
in API level 37.
The ODP APIs are deprecated and will not be supported in future Android releases.
There is no direct replacement API available. Developers currently integrated with these APIs
must cease further integration efforts. For comprehensive details regarding this deprecation and
the future roadmap of Privacy Sandbox on Android, please consult the official Privacy Sandbox
developer documentation and announcements:
<https://privacysandbox.google.com>* [OperationApplicationException](https://developer.android.com/reference/android/content/OperationApplicationException) Thrown when an application of a `https://developer.android.com/reference/android/content/ContentProviderOperation` fails due the specified constraints. [OperationCanceledException](https://developer.android.com/reference/android/os/OperationCanceledException) An exception type that is thrown when an operation in progress is canceled. [OptionalDataException](https://developer.android.com/reference/java/io/OptionalDataException) Exception indicating the failure of an object read operation due to unread primitive data, or the end of data belonging to a serialized object in the stream. [OutOfMemoryError](https://developer.android.com/reference/java/lang/OutOfMemoryError) Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector. [OverlappingFileLockException](https://developer.android.com/reference/java/nio/channels/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. [PackageManager.NameNotFoundException](https://developer.android.com/reference/android/content/pm/PackageManager.NameNotFoundException) This exception is thrown when a given package, application, or component name cannot be found. [ParcelFileDescriptor.FileDescriptorDetachedException](https://developer.android.com/reference/android/os/ParcelFileDescriptor.FileDescriptorDetachedException) Exception that indicates that the file descriptor was detached. [ParcelFormatException](https://developer.android.com/reference/android/os/ParcelFormatException) The contents of a Parcel (usually during unmarshalling) does not contain the expected data. [ParseException](https://developer.android.com/reference/java/text/ParseException) Signals that an error has been reached unexpectedly while parsing. [ParserConfigurationException](https://developer.android.com/reference/javax/xml/parsers/ParserConfigurationException) Indicates a serious configuration error. [PatternSyntaxException](https://developer.android.com/reference/java/util/regex/PatternSyntaxException) Unchecked exception thrown to indicate a syntax error in a regular-expression pattern. [PccEgressException](https://developer.android.com/reference/android/app/privatecompute/PccEgressException) Exception thrown when an egress request fails inside the PCC sandbox. [PendingIntent.CanceledException](https://developer.android.com/reference/android/app/PendingIntent.CanceledException) Exception thrown when trying to send through a PendingIntent that has been canceled or is otherwise no longer able to execute the request. [PortUnreachableException](https://developer.android.com/reference/java/net/PortUnreachableException) Signals that an ICMP Port Unreachable message has been received on a connected datagram. [PrivilegedActionException](https://developer.android.com/reference/java/security/PrivilegedActionException) Legacy security code; do not use. [PropertyMapper.PropertyConflictException](https://developer.android.com/reference/android/view/inspector/PropertyMapper.PropertyConflictException) Thrown from a map method if a property name is already mapped as different type. [PropertyReader.PropertyTypeMismatchException](https://developer.android.com/reference/android/view/inspector/PropertyReader.PropertyTypeMismatchException) Thrown if a client calls a typed read method for a property of a different type. [ProtocolException](https://developer.android.com/reference/java/net/ProtocolException) Thrown to indicate that there is an error in the underlying protocol, such as a TCP error. [ProviderException](https://developer.android.com/reference/java/security/ProviderException) A runtime exception for Provider exceptions (such as misconfiguration errors or unrecoverable internal errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors. [ProviderMismatchException](https://developer.android.com/reference/java/nio/file/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. [ProviderNotFoundException](https://developer.android.com/reference/java/nio/file/ProviderNotFoundException) Runtime exception thrown when a provider of the required type cannot be found. [QueryLocationException](https://developer.android.com/reference/android/telecom/QueryLocationException) This class represents a set of exceptions that can occur when requesting a `https://developer.android.com/reference/android/telecom/Connection#queryLocationForEmergency(long,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.location.Location,android.telecom.QueryLocationException>)` [QuicException](https://developer.android.com/reference/android/net/http/QuicException) Subclass of `https://developer.android.com/reference/android/net/http/NetworkException` which contains a detailed [QUIC](https://www.chromium.org/quic) error code from [QuicErrorCode](https://cs.chromium.org/search/?q=symbol:%5CbQuicErrorCode%5Cb). [RSDriverException](https://developer.android.com/reference/android/renderscript/RSDriverException) *This class was deprecated
in API level 31.
Renderscript has been deprecated in API level 31. Please refer to the [migration
guide](https://developer.android.com/guide/topics/renderscript/migration-guide) for the proposed alternatives.* [RSIllegalArgumentException](https://developer.android.com/reference/android/renderscript/RSIllegalArgumentException) *This class was deprecated
in API level 31.
Renderscript has been deprecated in API level 31. Please refer to the [migration
guide](https://developer.android.com/guide/topics/renderscript/migration-guide) for the proposed alternatives.* [RSInvalidStateException](https://developer.android.com/reference/android/renderscript/RSInvalidStateException) *This class was deprecated
in API level 31.
Renderscript has been deprecated in API level 31. Please refer to the [migration
guide](https://developer.android.com/guide/topics/renderscript/migration-guide) for the proposed alternatives.* [RSRuntimeException](https://developer.android.com/reference/android/renderscript/RSRuntimeException) *This class was deprecated
in API level 31.
Renderscript has been deprecated in API level 31. Please refer to the [migration
guide](https://developer.android.com/guide/topics/renderscript/migration-guide) for the proposed alternatives.* [ReadOnlyBufferException](https://developer.android.com/reference/java/nio/ReadOnlyBufferException) Unchecked exception thrown when a content-mutation method such as put or compact is invoked upon a read-only buffer. [ReadOnlyFileSystemException](https://developer.android.com/reference/java/nio/file/ReadOnlyFileSystemException) Unchecked exception thrown when an attempt is made to update an object associated with a `https://developer.android.com/reference/java/nio/file/FileSystem#isReadOnly()` `FileSystem`. [ReadPendingException](https://developer.android.com/reference/java/nio/channels/ReadPendingException) Unchecked exception thrown when an attempt is made to read from an asynchronous socket channel and a previous read has not completed. [ReceiverCallNotAllowedException](https://developer.android.com/reference/android/content/ReceiverCallNotAllowedException) This exception is thrown from `https://developer.android.com/reference/android/content/Context#registerReceiver(android.content.BroadcastReceiver,%20android.content.IntentFilter)` and `https://developer.android.com/reference/android/content/Context#bindService(android.content.Intent,%20android.content.Context.BindServiceFlags,%20java.util.concurrent.Executor,%20android.content.ServiceConnection)` when these methods are being used from an `https://developer.android.com/reference/android/content/BroadcastReceiver` component. [RecoverableSecurityException](https://developer.android.com/reference/android/app/RecoverableSecurityException) Specialization of `https://developer.android.com/reference/java/lang/SecurityException` that contains additional information about how to involve the end user to recover from the exception. [ReflectiveOperationException](https://developer.android.com/reference/java/lang/ReflectiveOperationException) Common superclass of exceptions thrown by reflective operations in core reflection. [RejectedExecutionException](https://developer.android.com/reference/java/util/concurrent/RejectedExecutionException) Exception thrown by an `https://developer.android.com/reference/java/util/concurrent/Executor` when a task cannot be accepted for execution. [RemoteException](https://developer.android.com/reference/android/os/RemoteException) Parent exception for all Binder remote-invocation errors Note: not all exceptions from binder services will be subclasses of this. [RemoteViews.ActionException](https://developer.android.com/reference/android/widget/RemoteViews.ActionException) Exception to send when something goes wrong executing an action [RequestSurfacePackageException](https://developer.android.com/reference/android/app/sdksandbox/RequestSurfacePackageException) *This class was deprecated
in API level 35.
Exception is used at `https://developer.android.com/reference/android/app/sdksandbox/SdkSandboxManager#requestSurfacePackage(java.lang.String,%20android.os.Bundle,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.os.Bundle,android.app.sdksandbox.RequestSurfacePackageException>)` which is getting
deprecated.* [ResourceBusyException](https://developer.android.com/reference/android/media/ResourceBusyException) Exception thrown when an operation on a MediaDrm object is attempted and hardware resources are not available, due to being in use. [ResourceMismatchViolation](https://developer.android.com/reference/android/os/strictmode/ResourceMismatchViolation) [Resources.NotFoundException](https://developer.android.com/reference/android/content/res/Resources.NotFoundException) This exception is thrown by the resource APIs when a requested resource can not be found. [RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException) `RuntimeException` is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine. [SAXException](https://developer.android.com/reference/org/xml/sax/SAXException) Encapsulate a general SAX error or warning. [SAXNotRecognizedException](https://developer.android.com/reference/org/xml/sax/SAXNotRecognizedException) Exception class for an unrecognized identifier. [SAXNotSupportedException](https://developer.android.com/reference/org/xml/sax/SAXNotSupportedException) Exception class for an unsupported operation. [SAXParseException](https://developer.android.com/reference/org/xml/sax/SAXParseException) Encapsulate an XML parse error or warning. [SQLClientInfoException](https://developer.android.com/reference/java/sql/SQLClientInfoException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` is thrown when one or more client info properties could not be set on a `Connection`. [SQLDataException](https://developer.android.com/reference/java/sql/SQLDataException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown when the SQLState class value is '*22*', or under vendor-specified conditions. [SQLException](https://developer.android.com/reference/android/database/SQLException) An exception that indicates there was an error with SQL parsing or execution. [SQLFeatureNotSupportedException](https://developer.android.com/reference/java/sql/SQLFeatureNotSupportedException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown when the SQLState class value is '*0A*' ( the value is 'zero' A). [SQLIntegrityConstraintViolationException](https://developer.android.com/reference/java/sql/SQLIntegrityConstraintViolationException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown when the SQLState class value is '*23*', or under vendor-specified conditions. [SQLInvalidAuthorizationSpecException](https://developer.android.com/reference/java/sql/SQLInvalidAuthorizationSpecException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown when the SQLState class value is '*28*', or under vendor-specified conditions. [SQLNonTransientConnectionException](https://developer.android.com/reference/java/sql/SQLNonTransientConnectionException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown for the SQLState class value '*08*', or under vendor-specified conditions. [SQLNonTransientException](https://developer.android.com/reference/java/sql/SQLNonTransientException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown when an instance where a retry of the same operation would fail unless the cause of the `SQLException` is corrected. [SQLRecoverableException](https://developer.android.com/reference/java/sql/SQLRecoverableException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown in situations where a previously failed operation might be able to succeed if the application performs some recovery steps and retries the entire transaction or in the case of a distributed transaction, the transaction branch. [SQLSyntaxErrorException](https://developer.android.com/reference/java/sql/SQLSyntaxErrorException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown when the SQLState class value is '*42*', or under vendor-specified conditions. [SQLTimeoutException](https://developer.android.com/reference/java/sql/SQLTimeoutException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown when the timeout specified by `Statement`
has expired.


[SQLTransactionRollbackException](https://developer.android.com/reference/java/sql/SQLTransactionRollbackException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` thrown when the SQLState class value is '*40*', or under vendor-specified conditions. [SQLTransientConnectionException](https://developer.android.com/reference/java/sql/SQLTransientConnectionException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` for the SQLState class value '*08*', or under vendor-specified conditions. [SQLTransientException](https://developer.android.com/reference/java/sql/SQLTransientException) The subclass of `https://developer.android.com/reference/java/sql/SQLException` is thrown in situations where a previoulsy failed operation might be able to succeed when the operation is retried without any intervention by application-level functionality. [SQLWarning](https://developer.android.com/reference/java/sql/SQLWarning) An exception that provides information on database access
warnings.


[SQLiteAbortException](https://developer.android.com/reference/android/database/sqlite/SQLiteAbortException) An exception that indicates that the SQLite program was aborted. [SQLiteAccessPermException](https://developer.android.com/reference/android/database/sqlite/SQLiteAccessPermException) This exception class is used when sqlite can't access the database file due to lack of permissions on the file. [SQLiteBindOrColumnIndexOutOfRangeException](https://developer.android.com/reference/android/database/sqlite/SQLiteBindOrColumnIndexOutOfRangeException) Thrown if the bind or column parameter index is out of range. [SQLiteBlobTooBigException](https://developer.android.com/reference/android/database/sqlite/SQLiteBlobTooBigException) [SQLiteCantOpenDatabaseException](https://developer.android.com/reference/android/database/sqlite/SQLiteCantOpenDatabaseException) [SQLiteConstraintException](https://developer.android.com/reference/android/database/sqlite/SQLiteConstraintException) An exception that indicates that an integrity constraint was violated. [SQLiteDatabaseCorruptException](https://developer.android.com/reference/android/database/sqlite/SQLiteDatabaseCorruptException) An exception that indicates that the SQLite database file is corrupt. [SQLiteDatabaseLockedException](https://developer.android.com/reference/android/database/sqlite/SQLiteDatabaseLockedException) Thrown if the database engine was unable to acquire the database locks it needs to do its job. [SQLiteDatatypeMismatchException](https://developer.android.com/reference/android/database/sqlite/SQLiteDatatypeMismatchException) [SQLiteDiskIOException](https://developer.android.com/reference/android/database/sqlite/SQLiteDiskIOException) Indicates that an IO error occurred while accessing the SQLite database file. [SQLiteDoneException](https://developer.android.com/reference/android/database/sqlite/SQLiteDoneException) An exception that indicates that the SQLite program is done. [SQLiteException](https://developer.android.com/reference/android/database/sqlite/SQLiteException) A SQLite exception that indicates there was an error with SQL parsing or execution. [SQLiteFullException](https://developer.android.com/reference/android/database/sqlite/SQLiteFullException) An exception that indicates that the SQLite database is full. [SQLiteMisuseException](https://developer.android.com/reference/android/database/sqlite/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](https://developer.android.com/reference/android/database/sqlite/SQLiteOutOfMemoryException) [SQLiteReadOnlyDatabaseException](https://developer.android.com/reference/android/database/sqlite/SQLiteReadOnlyDatabaseException) [SQLiteTableLockedException](https://developer.android.com/reference/android/database/sqlite/SQLiteTableLockedException) [SSLException](https://developer.android.com/reference/javax/net/ssl/SSLException) Indicates some kind of error detected by an SSL subsystem. [SSLHandshakeException](https://developer.android.com/reference/javax/net/ssl/SSLHandshakeException) Indicates that the client and server could not negotiate the desired level of security. [SSLKeyException](https://developer.android.com/reference/javax/net/ssl/SSLKeyException) Reports a bad SSL key. [SSLPeerUnverifiedException](https://developer.android.com/reference/javax/net/ssl/SSLPeerUnverifiedException) Indicates that the peer's identity has not been verified. [SSLProtocolException](https://developer.android.com/reference/javax/net/ssl/SSLProtocolException) Reports an error in the operation of the SSL protocol. [SecureKeyImportUnavailableException](https://developer.android.com/reference/android/security/keystore/SecureKeyImportUnavailableException) Indicates that the Keystore does not support securely importing wrapped keys. [SecurityException](https://developer.android.com/reference/java/lang/SecurityException) Thrown by the security manager to indicate a security violation. [ServiceConfigurationError](https://developer.android.com/reference/java/util/ServiceConfigurationError) Error thrown when something goes wrong while locating, loading, or instantiating a service provider. [ServiceConnectionLeakedViolation](https://developer.android.com/reference/android/os/strictmode/ServiceConnectionLeakedViolation) [ServiceStartNotAllowedException](https://developer.android.com/reference/android/app/ServiceStartNotAllowedException) Exception thrown when an app tries to start a `https://developer.android.com/reference/android/app/Service` when it's not allowed to do so. [SessionTranscriptMismatchException](https://developer.android.com/reference/android/security/identity/SessionTranscriptMismatchException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [Settings.SettingNotFoundException](https://developer.android.com/reference/android/provider/Settings.SettingNotFoundException) [ShortBufferException](https://developer.android.com/reference/javax/crypto/ShortBufferException) This exception is thrown when an output buffer provided by the user is too short to hold the operation result. [ShutdownChannelGroupException](https://developer.android.com/reference/java/nio/channels/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. [SignatureException](https://developer.android.com/reference/java/security/SignatureException) This is the generic Signature exception. [SigningInfoException](https://developer.android.com/reference/android/content/pm/SigningInfoException) Indicates an error when verifying the [app signing](https://source.android.com/docs/security/features/apksigning) information. [SipException](https://developer.android.com/reference/android/net/sip/SipException) *This class was deprecated
in API level 31.
`https://developer.android.com/reference/android/net/sip/SipManager` and associated classes are no longer supported and
should not be used as the basis of future VOIP apps.* [SkeletonSyntaxException](https://developer.android.com/reference/android/icu/number/SkeletonSyntaxException) Exception used for illegal number skeleton strings. [SocketException](https://developer.android.com/reference/java/net/SocketException) Thrown to indicate that there is an error creating or accessing a Socket. [SocketTimeoutException](https://developer.android.com/reference/java/net/SocketTimeoutException) Signals that a timeout has occurred on a socket read or accept. [SqliteObjectLeakedViolation](https://developer.android.com/reference/android/os/strictmode/SqliteObjectLeakedViolation) [StackOverflowError](https://developer.android.com/reference/java/lang/StackOverflowError) Thrown when a stack overflow occurs because an application recurses too deeply. [StaleDataException](https://developer.android.com/reference/android/database/StaleDataException) This exception is thrown when a Cursor contains stale data and must be requeried before being used again. [StartForegroundCalledOnStoppedServiceException](https://developer.android.com/reference/android/app/StartForegroundCalledOnStoppedServiceException) Exception thrown when `https://developer.android.com/reference/android/app/Service#startForeground(int,%20android.app.Notification)` is called on a service that's not actually started. [StreamCorruptedException](https://developer.android.com/reference/java/io/StreamCorruptedException) Thrown when control information that was read from an object stream violates internal consistency checks. [StringConcatException](https://developer.android.com/reference/java/lang/invoke/StringConcatException) StringConcatException is thrown by `https://developer.android.com/` when linkage invariants are violated. [StringIndexOutOfBoundsException](https://developer.android.com/reference/java/lang/StringIndexOutOfBoundsException) Thrown by `String` methods to indicate that an index is either negative or greater than the size of the string. [StringPrepParseException](https://developer.android.com/reference/android/icu/text/StringPrepParseException) Exception that signals an error has occurred while parsing the input to StringPrep or IDNA. [StrongBoxUnavailableException](https://developer.android.com/reference/android/security/keystore/StrongBoxUnavailableException) Indicates that an operation could not be performed because the requested security hardware is not available. [Surface.OutOfResourcesException](https://developer.android.com/reference/android/view/Surface.OutOfResourcesException) Exception thrown when a Canvas couldn't be locked with `https://developer.android.com/reference/android/view/Surface#lockCanvas(android.graphics.Rect)`, or when a SurfaceTexture could not successfully be allocated. [SurfaceHolder.BadSurfaceTypeException](https://developer.android.com/reference/android/view/SurfaceHolder.BadSurfaceTypeException) Exception that is thrown from `https://developer.android.com/reference/android/view/SurfaceHolder#lockCanvas()` when called on a Surface whose type is SURFACE_TYPE_PUSH_BUFFERS. [SurfaceTexture.OutOfResourcesException](https://developer.android.com/reference/android/graphics/SurfaceTexture.OutOfResourcesException) *This class was deprecated
in API level 19.
No longer thrown. `https://developer.android.com/reference/android/view/Surface.OutOfResourcesException`
is used instead.* [SyncFailedException](https://developer.android.com/reference/java/io/SyncFailedException) Signals that a sync operation has failed. [SystemUpdatePolicy.ValidationFailedException](https://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.ValidationFailedException) An exception class that represents various validation errors thrown from `https://developer.android.com/reference/android/app/admin/SystemUpdatePolicy#setFreezePeriods(java.util.List<android.app.admin.FreezePeriod>)` and `https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setSystemUpdatePolicy(android.content.ComponentName,%20android.app.admin.SystemUpdatePolicy)` [TagLostException](https://developer.android.com/reference/android/nfc/TagLostException) [TelephonyManager.CallComposerException](https://developer.android.com/reference/android/telephony/TelephonyManager.CallComposerException) Exception that may be supplied to the callback in `https://developer.android.com/reference/android/telephony/TelephonyManager#uploadCallComposerPicture(java.io.InputStream,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.os.ParcelUuid,android.telephony.TelephonyManager.CallComposerException>)` if something goes awry. [TelephonyManager.ModemErrorException](https://developer.android.com/reference/android/telephony/TelephonyManager.ModemErrorException) Exception that is supplied to the callback in `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSlicingConfiguration(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telephony.data.NetworkSlicingConfig,android.telephony.TelephonyManager.NetworkSlicingException>)` if the modem returned a failure. [TelephonyManager.NetworkSlicingException](https://developer.android.com/reference/android/telephony/TelephonyManager.NetworkSlicingException) Exception that may be supplied to the callback in `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSlicingConfiguration(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telephony.data.NetworkSlicingConfig,android.telephony.TelephonyManager.NetworkSlicingException>)` if something goes awry. [TelephonyManager.TimeoutException](https://developer.android.com/reference/android/telephony/TelephonyManager.TimeoutException) Exception that is supplied to the callback in `https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkSlicingConfiguration(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telephony.data.NetworkSlicingConfig,android.telephony.TelephonyManager.NetworkSlicingException>)` if the system timed out waiting for a response from the Radio. [ThreadDeath](https://developer.android.com/reference/java/lang/ThreadDeath) An instance of `ThreadDeath` is thrown in the victim thread when the (deprecated) `https://developer.android.com/reference/java/lang/Thread#stop()` method is invoked. [TimeFormatException](https://developer.android.com/reference/android/util/TimeFormatException) [TimeoutException](https://developer.android.com/reference/java/util/concurrent/TimeoutException) Exception thrown when a blocking operation times out. [TooManyListenersException](https://developer.android.com/reference/java/util/TooManyListenersException)
The `TooManyListenersException ` Exception is used as part of
the Java Event model to annotate and implement a unicast special case of
a multicast Event Source.


[TransactionTooLargeException](https://developer.android.com/reference/android/os/TransactionTooLargeException) The Binder transaction failed because it was too large. [TransformerConfigurationException](https://developer.android.com/reference/javax/xml/transform/TransformerConfigurationException) Indicates a serious configuration error. [TransformerException](https://developer.android.com/reference/javax/xml/transform/TransformerException) This class specifies an exceptional condition that occurred during the transformation process. [TransformerFactoryConfigurationError](https://developer.android.com/reference/javax/xml/transform/TransformerFactoryConfigurationError) Thrown when a problem with configuration with the Transformer Factories exists. [TypeNotPresentException](https://developer.android.com/reference/java/lang/TypeNotPresentException) Thrown when an application tries to access a type using a string representing the type's name, but no definition for the type with the specified name can be found. [URISyntaxException](https://developer.android.com/reference/java/net/URISyntaxException) Checked exception thrown to indicate that a string could not be parsed as a URI reference. [UTFDataFormatException](https://developer.android.com/reference/java/io/UTFDataFormatException) Signals that a malformed string in [modified UTF-8](https://developer.android.com/reference/java/lang/DataInput#modified-utf-8) format has been read in a data input stream or by any class that implements the data input interface. [UnbufferedIoViolation](https://developer.android.com/reference/android/os/strictmode/UnbufferedIoViolation) See #`https://developer.android.com/reference/android/os/StrictMode.ThreadPolicy.Builder#detectUnbufferedIo()` [UncheckedIOException](https://developer.android.com/reference/java/io/UncheckedIOException) Wraps an `https://developer.android.com/reference/java/io/IOException` with an unchecked exception. [UndeclaredThrowableException](https://developer.android.com/reference/java/lang/reflect/UndeclaredThrowableException) Thrown by a method invocation on a proxy instance if its invocation handler's `https://developer.android.com/reference/java/lang/reflect/InvocationHandler#invoke(java.lang.Object,%20java.lang.reflect.Method,%20java.lang.Object[])` method throws a checked exception (a `Throwable` that is not assignable to `RuntimeException` or `Error`) that is not assignable to any of the exception types declared in the `throws` clause of the method that was invoked on the proxy instance and dispatched to the invocation handler. [UnknownAuthenticationKeyException](https://developer.android.com/reference/android/security/identity/UnknownAuthenticationKeyException) *This class was deprecated
in API level 37.2.
Use `java.security.KeyStore` with the Android hardware-backed keystore instead.* [UnknownError](https://developer.android.com/reference/java/lang/UnknownError) Thrown when an unknown but serious exception has occurred in the Java Virtual Machine. [UnknownFormatConversionException](https://developer.android.com/reference/java/util/UnknownFormatConversionException) Unchecked exception thrown when an unknown conversion is given. [UnknownFormatFlagsException](https://developer.android.com/reference/java/util/UnknownFormatFlagsException) Unchecked exception thrown when an unknown flag is given. [UnknownHostException](https://developer.android.com/reference/java/net/UnknownHostException) Thrown to indicate that the IP address of a host could not be determined. [UnknownServiceException](https://developer.android.com/reference/java/net/UnknownServiceException) Thrown to indicate that an unknown service exception has occurred. [UnmappableCharacterException](https://developer.android.com/reference/java/nio/charset/UnmappableCharacterException) Checked exception thrown when an input character (or byte) sequence is valid but cannot be mapped to an output byte (or character) sequence. [UnrecoverableEntryException](https://developer.android.com/reference/java/security/UnrecoverableEntryException) This exception is thrown if an entry in the keystore cannot be recovered. [UnrecoverableKeyException](https://developer.android.com/reference/java/security/UnrecoverableKeyException) This exception is thrown if a key in the keystore cannot be recovered. [UnresolvedAddressException](https://developer.android.com/reference/java/nio/channels/UnresolvedAddressException) Unchecked exception thrown when an attempt is made to invoke a network operation upon an unresolved socket address. [UnsafeIntentLaunchViolation](https://developer.android.com/reference/android/os/strictmode/UnsafeIntentLaunchViolation) Violation raised when your app launches an `https://developer.android.com/reference/android/content/Intent` which originated from outside your app. [UnsafeStateException](https://developer.android.com/reference/android/app/admin/UnsafeStateException) Exception thrown when a `https://developer.android.com/reference/android/app/admin/DevicePolicyManager` operation failed because it was not safe to be executed at that moment. [UnsatisfiedLinkError](https://developer.android.com/reference/java/lang/UnsatisfiedLinkError) Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared `native`. [UnsupportedAddressTypeException](https://developer.android.com/reference/java/nio/channels/UnsupportedAddressTypeException) Unchecked exception thrown when an attempt is made to bind or connect to a socket address of a type that is not supported. [UnsupportedCallbackException](https://developer.android.com/reference/javax/security/auth/callback/UnsupportedCallbackException) Signals that a `CallbackHandler` does not recognize a particular `Callback`. [UnsupportedCharsetException](https://developer.android.com/reference/java/nio/charset/UnsupportedCharsetException) Unchecked exception thrown when no support is available for a requested charset. [UnsupportedClassVersionError](https://developer.android.com/reference/java/lang/UnsupportedClassVersionError) Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported. [UnsupportedEncodingException](https://developer.android.com/reference/java/io/UnsupportedEncodingException) The Character Encoding is not supported. [UnsupportedOperationException](https://developer.android.com/reference/java/lang/UnsupportedOperationException) Thrown to indicate that the requested operation is not supported. [UnsupportedSchemeException](https://developer.android.com/reference/android/media/UnsupportedSchemeException) Exception thrown when an attempt is made to construct a MediaDrm object using a crypto scheme UUID that is not supported by the device [UnsupportedTemporalTypeException](https://developer.android.com/reference/java/time/temporal/UnsupportedTemporalTypeException) UnsupportedTemporalTypeException indicates that a ChronoField or ChronoUnit is not supported for a Temporal class. [UntaggedSocketViolation](https://developer.android.com/reference/android/os/strictmode/UntaggedSocketViolation) [UserManager.UserOperationException](https://developer.android.com/reference/android/os/UserManager.UserOperationException) Thrown to indicate user operation failed. [UserNotAuthenticatedException](https://developer.android.com/reference/android/security/keystore/UserNotAuthenticatedException) Indicates that a cryptographic operation could not be performed because the user has not been authenticated recently enough. [UserPresenceUnavailableException](https://developer.android.com/reference/android/security/keystore/UserPresenceUnavailableException) Indicates the condition that a proof of user-presence was requested but this proof was not presented. [UserPrincipalNotFoundException](https://developer.android.com/reference/java/nio/file/attribute/UserPrincipalNotFoundException) Checked exception thrown when a lookup of `https://developer.android.com/reference/java/nio/file/attribute/UserPrincipal` fails because the principal does not exist. [VerifyError](https://developer.android.com/reference/java/lang/VerifyError) Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem. [VibrationEffect.VibrationParseException](https://developer.android.com/reference/android/os/VibrationEffect.VibrationParseException) Exception thrown when parsing a vibration XML fails due to invalid format or values. [VirtualMachineError](https://developer.android.com/reference/java/lang/VirtualMachineError) Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating. [WebViewMethodCalledOnWrongThreadViolation](https://developer.android.com/reference/android/os/strictmode/WebViewMethodCalledOnWrongThreadViolation) [WindowManager.BadTokenException](https://developer.android.com/reference/android/view/WindowManager.BadTokenException) Exception that is thrown when trying to add view whose `https://developer.android.com/reference/android/view/WindowManager.LayoutParams` `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#token` is invalid. [WindowManager.InvalidDisplayException](https://developer.android.com/reference/android/view/WindowManager.InvalidDisplayException) Exception that is thrown when calling `https://developer.android.com/reference/android/view/ViewManager#addView(android.view.View,%20android.view.ViewGroup.LayoutParams)` to a secondary display that cannot be found. [WriteAbortedException](https://developer.android.com/reference/java/io/WriteAbortedException) Signals that one of the ObjectStreamExceptions was thrown during a write operation. [WritePendingException](https://developer.android.com/reference/java/nio/channels/WritePendingException) Unchecked exception thrown when an attempt is made to write to an asynchronous socket channel and a previous write has not completed. [WrongMethodTypeException](https://developer.android.com/reference/java/lang/invoke/WrongMethodTypeException) Thrown to indicate that code has attempted to call a method handle via the wrong method type. [WrongThreadException](https://developer.android.com/reference/java/lang/WrongThreadException) Thrown to indicate that a method has been called on the wrong thread. [XPathException](https://developer.android.com/reference/javax/xml/xpath/XPathException) `XPathException` represents a generic XPath exception. [XPathExpressionException](https://developer.android.com/reference/javax/xml/xpath/XPathExpressionException) `XPathExpressionException` represents an error in an XPath expression. [XPathFactoryConfigurationException](https://developer.android.com/reference/javax/xml/xpath/XPathFactoryConfigurationException) `XPathFactoryConfigurationException` represents a configuration error in a `XPathFactory` environment. [XPathFunctionException](https://developer.android.com/reference/javax/xml/xpath/XPathFunctionException) `XPathFunctionException` represents an error with an XPath function. [XmlPullParserException](https://developer.android.com/reference/org/xmlpull/v1/XmlPullParserException) This exception is thrown to signal XML Pull Parser related faults. [ZipError](https://developer.android.com/reference/java/util/zip/ZipError) Signals that an unrecoverable error has occurred. [ZipException](https://developer.android.com/reference/java/util/zip/ZipException) Signals that a Zip exception of some sort has occurred. [ZoneRulesException](https://developer.android.com/reference/java/time/zone/ZoneRulesException) Thrown to indicate a problem with time-zone configuration.   

*** ** * ** ***

The `Throwable` class is the superclass of all errors and
exceptions in the Java language. Only objects that are instances of this
class (or one of its subclasses) are thrown by the Java Virtual Machine or
can be thrown by the Java `throw` statement. Similarly, only
this class or one of its subclasses can be the argument type in a
`catch` clause.

For the purposes of compile-time checking of exceptions, `Throwable` and any subclass of `Throwable` that is not also a
subclass of either `https://developer.android.com/reference/java/lang/RuntimeException` or `https://developer.android.com/reference/java/lang/Error` are
regarded as checked exceptions.

Instances of two subclasses, `https://developer.android.com/reference/java/lang/Error` and
`https://developer.android.com/reference/java/lang/Exception`, are conventionally used to indicate
that exceptional situations have occurred. Typically, these instances
are freshly created in the context of the exceptional situation so
as to include relevant information (such as stack trace data).

A throwable contains a snapshot of the execution stack of its
thread at the time it was created. It can also contain a message
string that gives more information about the error. Over time, a
throwable can [suppress](https://developer.android.com/reference/java/lang/Throwable#addSuppressed(java.lang.Throwable)) other
throwables from being propagated. Finally, the throwable can also
contain a *cause*: another throwable that caused this
throwable to be constructed. The recording of this causal information
is referred to as the *chained exception* facility, as the
cause can, itself, have a cause, and so on, leading to a "chain" of
exceptions, each caused by another.

One reason that a throwable may have a cause is that the class that
throws it is built atop a lower layered abstraction, and an operation on
the upper layer fails due to a failure in the lower layer. It would be bad
design to let the throwable thrown by the lower layer propagate outward, as
it is generally unrelated to the abstraction provided by the upper layer.
Further, doing so would tie the API of the upper layer to the details of
its implementation, assuming the lower layer's exception was a checked
exception. Throwing a "wrapped exception" (i.e., an exception containing a
cause) allows the upper layer to communicate the details of the failure to
its caller without incurring either of these shortcomings. It preserves
the flexibility to change the implementation of the upper layer without
changing its API (in particular, the set of exceptions thrown by its
methods).

A second reason that a throwable may have a cause is that the method
that throws it must conform to a general-purpose interface that does not
permit the method to throw the cause directly. For example, suppose
a persistent collection conforms to the `https://developer.android.com/reference/java/util/Collection` interface, and that its persistence is implemented atop
`java.io`. Suppose the internals of the `add` method
can throw an `https://developer.android.com/reference/java/io/IOException`. The implementation
can communicate the details of the `IOException` to its caller
while conforming to the `Collection` interface by wrapping the
`IOException` in an appropriate unchecked exception. (The
specification for the persistent collection should indicate that it is
capable of throwing such exceptions.)

A cause can be associated with a throwable in two ways: via a
constructor that takes the cause as an argument, or via the
`https://developer.android.com/reference/java/lang/Throwable#initCause(java.lang.Throwable)` method. New throwable classes that
wish to allow causes to be associated with them should provide constructors
that take a cause and delegate (perhaps indirectly) to one of the
`Throwable` constructors that takes a cause.

Because the `initCause` method is public, it allows a cause to be
associated with any throwable, even a "legacy throwable" whose
implementation predates the addition of the exception chaining mechanism to
`Throwable`.

By convention, class `Throwable` and its subclasses have two
constructors, one that takes no arguments and one that takes a
`String` argument that can be used to produce a detail message.
Further, those subclasses that might likely have a cause associated with
them should have two more constructors, one that takes a
`Throwable` (the cause), and one that takes a
`String` (the detail message) and a `Throwable` (the
cause).

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/java/lang/Throwable#Throwable()() ` Constructs a new throwable with `null` as its detail message. |
| ` https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.String)(https://developer.android.com/reference/java/lang/String message) ` Constructs a new throwable with the specified detail message. |
| ` https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.String,%20java.lang.Throwable)(https://developer.android.com/reference/java/lang/String message, https://developer.android.com/reference/java/lang/Throwable cause) ` Constructs a new throwable with the specified detail message and cause. |
| ` https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable cause) ` Constructs a new throwable with the specified cause and a detail message of `(cause==null ? null : cause.toString())` (which typically contains the class and detail message of `cause`). |

| ### Protected constructors ||
|---|---|
| ` https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.String,%20java.lang.Throwable,%20boolean,%20boolean)(https://developer.android.com/reference/java/lang/String message, https://developer.android.com/reference/java/lang/Throwable cause, boolean enableSuppression, boolean writableStackTrace) ` Constructs a new throwable with the specified detail message, cause, [suppression](https://developer.android.com/reference/java/lang/Throwable#addSuppressed(java.lang.Throwable)) enabled or disabled, and writable stack trace enabled or disabled. |

| ### Public methods ||
|---|---|
| ` final void` | ` https://developer.android.com/reference/java/lang/Throwable#addSuppressed(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable exception) ` Appends the specified exception to the exceptions that were suppressed in order to deliver this exception. |
| ` https://developer.android.com/reference/java/lang/Throwable` | ` https://developer.android.com/reference/java/lang/Throwable#fillInStackTrace()() ` Fills in the execution stack trace. |
| ` https://developer.android.com/reference/java/lang/Throwable` | ` https://developer.android.com/reference/java/lang/Throwable#getCause()() ` Returns the cause of this throwable or `null` if the cause is nonexistent or unknown. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Throwable#getLocalizedMessage()() ` Creates a localized description of this throwable. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Throwable#getMessage()() ` Returns the detail message string of this throwable. |
| ` https://developer.android.com/reference/java/lang/StackTraceElement` | ` https://developer.android.com/reference/java/lang/Throwable#getStackTrace()() ` Provides programmatic access to the stack trace information printed by `https://developer.android.com/reference/java/lang/Throwable#printStackTrace()`. |
| ` final https://developer.android.com/reference/java/lang/Throwable` | ` https://developer.android.com/reference/java/lang/Throwable#getSuppressed()() ` Returns an array containing all of the exceptions that were suppressed, typically by the `try`-with-resources statement, in order to deliver this exception. |
| ` https://developer.android.com/reference/java/lang/Throwable` | ` https://developer.android.com/reference/java/lang/Throwable#initCause(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable cause) ` Initializes the *cause* of this throwable to the specified value. |
| ` void` | ` https://developer.android.com/reference/java/lang/Throwable#printStackTrace()() ` Prints this throwable and its backtrace to the standard error stream. |
| ` void` | ` https://developer.android.com/reference/java/lang/Throwable#printStackTrace(java.io.PrintWriter)(https://developer.android.com/reference/java/io/PrintWriter s) ` Prints this throwable and its backtrace to the specified print writer. |
| ` void` | ` https://developer.android.com/reference/java/lang/Throwable#printStackTrace(java.io.PrintStream)(https://developer.android.com/reference/java/io/PrintStream s) ` Prints this throwable and its backtrace to the specified print stream. |
| ` void` | ` https://developer.android.com/reference/java/lang/Throwable#setStackTrace(java.lang.StackTraceElement[])(https://developer.android.com/reference/java/lang/StackTraceElement stackTrace) ` Sets the stack trace elements that will be returned by `https://developer.android.com/reference/java/lang/Throwable#getStackTrace()` and printed by `https://developer.android.com/reference/java/lang/Throwable#printStackTrace()` and related methods. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Throwable#toString()() ` Returns a short description of this throwable. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Public constructors

### Throwable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Throwable ()
```

Constructs a new throwable with `null` as its detail message.
The cause is not initialized, and may subsequently be initialized by a
call to `https://developer.android.com/reference/java/lang/Throwable#initCause(java.lang.Throwable)`.

The `https://developer.android.com/reference/java/lang/Throwable#fillInStackTrace()` method is called to initialize
the stack trace data in the newly created throwable.

<br />

### Throwable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Throwable (String message)
```

Constructs a new throwable with the specified detail message. The
cause is not initialized, and may subsequently be initialized by
a call to `https://developer.android.com/reference/java/lang/Throwable#initCause(java.lang.Throwable)`.

The `https://developer.android.com/reference/java/lang/Throwable#fillInStackTrace()` method is called to initialize
the stack trace data in the newly created throwable.

<br />

| Parameters ||
|---|---|
| `message` | `String`: the detail message. The detail message is saved for later retrieval by the `https://developer.android.com/reference/java/lang/Throwable#getMessage()` method. <br /> |

### Throwable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Throwable (String message, 
                Throwable cause)
```

Constructs a new throwable with the specified detail message and
cause.

Note that the detail message associated with
`cause` is *not* automatically incorporated in
this throwable's detail message.

The `https://developer.android.com/reference/java/lang/Throwable#fillInStackTrace()` method is called to initialize
the stack trace data in the newly created throwable.

<br />

| Parameters ||
|---|---|
| `message` | `String`: the detail message (which is saved for later retrieval by the `https://developer.android.com/reference/java/lang/Throwable#getMessage()` method). <br /> |
| `cause` | `Throwable`: the cause (which is saved for later retrieval by the `https://developer.android.com/reference/java/lang/Throwable#getCause()` method). (A `null` value is permitted, and indicates that the cause is nonexistent or unknown.) <br /> |

### Throwable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Throwable (Throwable cause)
```

Constructs a new throwable 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 throwables that are little more than
wrappers for other throwables (for example, `https://developer.android.com/reference/java/security/PrivilegedActionException`).

The `https://developer.android.com/reference/java/lang/Throwable#fillInStackTrace()` method is called to initialize
the stack trace data in the newly created throwable.

<br />

| Parameters ||
|---|---|
| `cause` | `Throwable`: the cause (which is saved for later retrieval by the `https://developer.android.com/reference/java/lang/Throwable#getCause()` method). (A `null` value is permitted, and indicates that the cause is nonexistent or unknown.) <br /> |

## Protected constructors

### Throwable

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected Throwable (String message, 
                Throwable cause, 
                boolean enableSuppression, 
                boolean writableStackTrace)
```

Constructs a new throwable with the specified detail message,
cause, [suppression](https://developer.android.com/reference/java/lang/Throwable#addSuppressed(java.lang.Throwable)) enabled or
disabled, and writable stack trace enabled or disabled. If
suppression is disabled, `https://developer.android.com/reference/java/lang/Throwable#getSuppressed()` for this object
will return a zero-length array and calls to `https://developer.android.com/reference/java/lang/Throwable#addSuppressed(java.lang.Throwable)` that would otherwise append an exception to the
suppressed list will have no effect. If the writable stack
trace is false, this constructor will not call `https://developer.android.com/reference/java/lang/Throwable#fillInStackTrace()`, a `null` will be written to the
`stackTrace` field, and subsequent calls to `fillInStackTrace` and `https://developer.android.com/reference/java/lang/Throwable#setStackTrace(java.lang.StackTraceElement[])` will not set the stack
trace. If the writable stack trace is false, `https://developer.android.com/reference/java/lang/Throwable#getStackTrace()` will return a zero length array.

Note that the other constructors of `Throwable` treat
suppression as being enabled and the stack trace as being
writable. Subclasses of `Throwable` should document any
conditions under which suppression is disabled and document
conditions under which the stack trace is not writable.
Disabling of suppression should only occur in exceptional
circumstances where special requirements exist, such as a
virtual machine reusing exception objects under low-memory
situations. Circumstances where a given exception object is
repeatedly caught and rethrown, such as to implement control
flow between two sub-systems, is another situation where
immutable throwable objects would be appropriate.

<br />

| Parameters ||
|---|---|
| `message` | `String`: the detail message. <br /> |
| `cause` | `Throwable`: the cause. (A `null` value is permitted, and indicates that the cause is nonexistent or unknown.) <br /> |
| `enableSuppression` | `boolean`: whether or not suppression is enabled or disabled <br /> |
| `writableStackTrace` | `boolean`: whether or not the stack trace should be writable <br /> |

**See also:**

- `https://developer.android.com/reference/java/lang/OutOfMemoryError`
- `https://developer.android.com/reference/java/lang/NullPointerException`
- `https://developer.android.com/reference/java/lang/ArithmeticException`

## Public methods

### addSuppressed

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void addSuppressed (Throwable exception)
```

Appends the specified exception to the exceptions that were
suppressed in order to deliver this exception. This method is
thread-safe and typically called (automatically and implicitly)
by the `try`-with-resources statement.

The suppression behavior is enabled *unless* disabled
[via
a constructor](https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.String,%20java.lang.Throwable,%20boolean,%20boolean)). When suppression is disabled, this method does
nothing other than to validate its argument.

Note that when one exception [causes](https://developer.android.com/reference/java/lang/Throwable#initCause(java.lang.Throwable)) another exception, the first
exception is usually caught and then the second exception is
thrown in response. In other words, there is a causal
connection between the two exceptions.

In contrast, there are situations where two independent
exceptions can be thrown in sibling code blocks, in particular
in the `try` block of a `try`-with-resources
statement and the compiler-generated `finally` block
which closes the resource.

In these situations, only one of the thrown exceptions can be
propagated. In the `try`-with-resources statement, when
there are two such exceptions, the exception originating from
the `try` block is propagated and the exception from the
`finally` block is added to the list of exceptions
suppressed by the exception from the `try` block. As an
exception unwinds the stack, it can accumulate multiple
suppressed exceptions.

An exception may have suppressed exceptions while also being
caused by another exception. Whether or not an exception has a
cause is semantically known at the time of its creation, unlike
whether or not an exception will suppress other exceptions
which is typically only determined after an exception is
thrown.

Note that programmer written code is also able to take
advantage of calling this method in situations where there are
multiple sibling exceptions and only one can be propagated.

<br />

| Parameters ||
|---|---|
| `exception` | `Throwable`: the exception to be added to the list of suppressed exceptions <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `exception` is this throwable; a throwable cannot suppress itself. |
| `https://developer.android.com/reference/java/lang/NullPointerException` | if `exception` is `null` |

### fillInStackTrace

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Throwable fillInStackTrace ()
```

Fills in the execution stack trace. This method records within this
`Throwable` object information about the current state of
the stack frames for the current thread.

If the stack trace of this `Throwable` [is not
writable](https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.String,%20java.lang.Throwable,%20boolean,%20boolean)), calling this method has no effect.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Throwable` | a reference to this `Throwable` instance. <br /> |

**See also:**

- `https://developer.android.com/reference/java/lang/Throwable#printStackTrace()`

### getCause

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Throwable getCause ()
```

Returns the cause of this throwable or `null` if the
cause is nonexistent or unknown. (The cause is the throwable that
caused this throwable to get thrown.)

This implementation returns the cause that was supplied via one of
the constructors requiring a `Throwable`, or that was set after
creation with the `https://developer.android.com/reference/java/lang/Throwable#initCause(java.lang.Throwable)` method. While it is
typically unnecessary to override this method, a subclass can override
it to return a cause set by some other means. This is appropriate for
a "legacy chained throwable" that predates the addition of chained
exceptions to `Throwable`. Note that it is *not*
necessary to override any of the `PrintStackTrace` methods,
all of which invoke the `getCause` method to determine the
cause of a throwable.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Throwable` | the cause of this throwable or `null` if the cause is nonexistent or unknown. <br /> |

### getLocalizedMessage

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getLocalizedMessage ()
```

Creates a localized description of this throwable.
Subclasses may override this method in order to produce a
locale-specific message. For subclasses that do not override this
method, the default implementation returns the same result as
`getMessage()`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The localized description of this throwable. <br /> |

### getMessage

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getMessage ()
```

Returns the detail message string of this throwable.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the detail message string of this `Throwable` instance (which may be `null`). <br /> |

### getStackTrace

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public StackTraceElement[] getStackTrace ()
```

Provides programmatic access to the stack trace information printed by
`https://developer.android.com/reference/java/lang/Throwable#printStackTrace()`. Returns an array of stack trace elements,
each representing one stack frame. The zeroth element of the array
(assuming the array's length is non-zero) represents the top of the
stack, which is the last method invocation in the sequence. Typically,
this is the point at which this throwable was created and thrown.
The last element of the array (assuming the array's length is non-zero)
represents the bottom of the stack, which is the first method invocation
in the sequence.

Some virtual machines may, under some circumstances, omit one
or more stack frames from the stack trace. In the extreme case,
a virtual machine that has no stack trace information concerning
this throwable is permitted to return a zero-length array from this
method. Generally speaking, the array returned by this method will
contain one element for every frame that would be printed by
`printStackTrace`. Writes to the returned array do not
affect future calls to this method.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/StackTraceElement` | an array of stack trace elements representing the stack trace pertaining to this throwable. <br /> |

### getSuppressed

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final Throwable[] getSuppressed ()
```

Returns an array containing all of the exceptions that were
suppressed, typically by the `try`-with-resources
statement, in order to deliver this exception.

If no exceptions were suppressed or [suppression is
disabled](https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.String,%20java.lang.Throwable,%20boolean,%20boolean)), an empty array is returned. This method is
thread-safe. Writes to the returned array do not affect future
calls to this method.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Throwable` | an array containing all of the exceptions that were suppressed to deliver this exception. <br /> |

### initCause

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Throwable initCause (Throwable cause)
```

Initializes the *cause* of this throwable to the specified value.
(The cause is the throwable that caused this throwable to get thrown.)

This method can be called at most once. It is generally called from
within the constructor, or immediately after creating the
throwable. If this throwable was created
with `https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.Throwable)` or
`https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.String,%20java.lang.Throwable)`, this method cannot be called
even once.

An example of using this method on a legacy throwable type
without other support for setting the cause is:

```
try {
    lowLevelOp();
} catch (LowLevelException le) {
    throw (HighLevelException)
          new HighLevelException().initCause(le); // Legacy constructor
}
```

<br />

<br />

| Parameters ||
|---|---|
| `cause` | `Throwable`: the cause (which is saved for later retrieval by the `https://developer.android.com/reference/java/lang/Throwable#getCause()` method). (A `null` value is permitted, and indicates that the cause is nonexistent or unknown.) <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Throwable` | a reference to this `Throwable` instance. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `cause` is this throwable. (A throwable cannot be its own cause.) |
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if this throwable was created with `https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.Throwable)` or `https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.String,%20java.lang.Throwable)`, or this method has already been called on this throwable. |

### printStackTrace

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void printStackTrace ()
```

Prints this throwable and its backtrace to the
standard error stream. This method prints a stack trace for this
`Throwable` object on the error output stream that is
the value of the field `System.err`. The first line of
output contains the result of the `https://developer.android.com/reference/java/lang/Throwable#toString()` method for
this object. Remaining lines represent data previously recorded by
the method `https://developer.android.com/reference/java/lang/Throwable#fillInStackTrace()`. The format of this
information depends on the implementation, but the following
example may be regarded as typical:
>
> ```
> java.lang.NullPointerException
>         at MyClass.mash(MyClass.java:9)
>         at MyClass.crunch(MyClass.java:6)
>         at MyClass.main(MyClass.java:3)
> ```
This example was produced by running the program:

```
class MyClass {
    public static void main(String[] args) {
        crunch(null);
    }
    static void crunch(int[] a) {
        mash(a);
    }
    static void mash(int[] b) {
        System.out.println(b[0]);
    }
}
```
The backtrace for a throwable with an initialized, non-null cause should generally include the backtrace for the cause. The format of this information depends on the implementation, but the following example may be regarded as typical:

```
HighLevelException: MidLevelException: LowLevelException
        at Junk.a(Junk.java:13)
        at Junk.main(Junk.java:4)
Caused by: MidLevelException: LowLevelException
        at Junk.c(Junk.java:23)
        at Junk.b(Junk.java:17)
        at Junk.a(Junk.java:11)
        ... 1 more
Caused by: LowLevelException
        at Junk.e(Junk.java:30)
        at Junk.d(Junk.java:27)
        at Junk.c(Junk.java:21)
        ... 3 more
```
Note the presence of lines containing the characters `"..."`. These lines indicate that the remainder of the stack trace for this exception matches the indicated number of frames from the bottom of the stack trace of the exception that was caused by this exception (the "enclosing" exception). This shorthand can greatly reduce the length of the output in the common case where a wrapped exception is thrown from same method as the "causative exception" is caught. The above example was produced by running the program:

```
public class Junk {
    public static void main(String args[]) {
        try {
            a();
        } catch(HighLevelException e) {
            e.printStackTrace();
        }
    }
    static void a() throws HighLevelException {
        try {
            b();
        } catch(MidLevelException e) {
            throw new HighLevelException(e);
        }
    }
    static void b() throws MidLevelException {
        c();
    }
    static void c() throws MidLevelException {
        try {
            d();
        } catch(LowLevelException e) {
            throw new MidLevelException(e);
        }
    }
    static void d() throws LowLevelException {
       e();
    }
    static void e() throws LowLevelException {
        throw new LowLevelException();
    }
}

class HighLevelException extends Exception {
    HighLevelException(Throwable cause) { super(cause); }
}

class MidLevelException extends Exception {
    MidLevelException(Throwable cause)  { super(cause); }
}

class LowLevelException extends Exception {
}
```
As of release 7, the platform supports the notion of *suppressed exceptions* (in conjunction with the `try`-with-resources statement). Any exceptions that were suppressed in order to deliver an exception are printed out beneath the stack trace. The format of this information depends on the implementation, but the following example may be regarded as typical:

```
Exception in thread "main" java.lang.Exception: Something happened
 at Foo.bar(Foo.java:10)
 at Foo.main(Foo.java:5)
 Suppressed: Resource$CloseFailException: Resource ID = 0
         at Resource.close(Resource.java:26)
         at Foo.bar(Foo.java:9)
         ... 1 more
```
Note that the "... n more" notation is used on suppressed exceptions just as it is used on causes. Unlike causes, suppressed exceptions are indented beyond their "containing exceptions."

An exception can have both a cause and one or more suppressed
exceptions:

```
Exception in thread "main" java.lang.Exception: Main block
 at Foo3.main(Foo3.java:7)
 Suppressed: Resource$CloseFailException: Resource ID = 2
         at Resource.close(Resource.java:26)
         at Foo3.main(Foo3.java:5)
 Suppressed: Resource$CloseFailException: Resource ID = 1
         at Resource.close(Resource.java:26)
         at Foo3.main(Foo3.java:5)
Caused by: java.lang.Exception: I did it
 at Foo3.main(Foo3.java:8)
```
Likewise, a suppressed exception can have a cause:

```
Exception in thread "main" java.lang.Exception: Main block
 at Foo4.main(Foo4.java:6)
 Suppressed: Resource2$CloseFailException: Resource ID = 1
         at Resource2.close(Resource2.java:20)
         at Foo4.main(Foo4.java:5)
 Caused by: java.lang.Exception: Rats, you caught me
         at Resource2$CloseFailException.<init>(Resource2.java:45)
         ... 2 more
```

<br />

<br />

### printStackTrace

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void printStackTrace (PrintWriter s)
```

Prints this throwable and its backtrace to the specified
print writer.

<br />

| Parameters ||
|---|---|
| `s` | `PrintWriter`: `PrintWriter` to use for output <br /> |

### printStackTrace

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void printStackTrace (PrintStream s)
```

Prints this throwable and its backtrace to the specified print stream.

<br />

| Parameters ||
|---|---|
| `s` | `PrintStream`: `PrintStream` to use for output <br /> |

### setStackTrace

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setStackTrace (StackTraceElement[] stackTrace)
```

Sets the stack trace elements that will be returned by
`https://developer.android.com/reference/java/lang/Throwable#getStackTrace()` and printed by `https://developer.android.com/reference/java/lang/Throwable#printStackTrace()`
and related methods.

This method, which is designed for use by RPC frameworks and other
advanced systems, allows the client to override the default
stack trace that is either generated by `https://developer.android.com/reference/java/lang/Throwable#fillInStackTrace()`
when a throwable is constructed or deserialized when a throwable is
read from a serialization stream.

If the stack trace of this `Throwable` [is not
writable](https://developer.android.com/reference/java/lang/Throwable#Throwable(java.lang.String,%20java.lang.Throwable,%20boolean,%20boolean)), calling this method has no effect other than
validating its argument.

<br />

| Parameters ||
|---|---|
| `stackTrace` | `StackTraceElement`: the stack trace elements to be associated with this `Throwable`. The specified array is copied by this call; changes in the specified array after the method invocation returns will have no affect on this `Throwable`'s stack trace. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException` | if `stackTrace` is `null` or if any of the elements of `stackTrace` are `null` |

### toString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a short description of this throwable.
The result is the concatenation of:

- the [name](https://developer.android.com/reference/java/lang/Class#getName()) of the class of this object
- ": " (a colon and a space)
- the result of invoking this object's `https://developer.android.com/reference/java/lang/Throwable#getLocalizedMessage()` method

If `getLocalizedMessage` returns `null`, then just the class name is returned.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of this throwable. <br /> |