Stay organized with collections
Save and categorize content based on your preferences.
RejectedExecutionException
open class RejectedExecutionException : RuntimeException
Exception thrown by an Executor
when a task cannot be accepted for execution.
Summary
Public constructors |
Constructs a RejectedExecutionException with no detail message.
|
Constructs a RejectedExecutionException with the specified detail message.
|
Constructs a RejectedExecutionException with the specified detail message and cause.
|
Constructs a RejectedExecutionException with the specified cause.
|
Public constructors
RejectedExecutionException
RejectedExecutionException()
Constructs a RejectedExecutionException
with no detail message. The cause is not initialized, and may subsequently be initialized by a call to initCause
.
RejectedExecutionException
RejectedExecutionException(message: String!)
Constructs a RejectedExecutionException
with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to initCause
.
Parameters |
message |
String!: the detail message |
RejectedExecutionException
RejectedExecutionException(
message: String!,
cause: Throwable!)
Constructs a RejectedExecutionException
with the specified detail message and cause.
Parameters |
message |
String!: the detail message |
cause |
Throwable!: the cause (which is saved for later retrieval by the getCause() method) |
RejectedExecutionException
RejectedExecutionException(cause: Throwable!)
Constructs a RejectedExecutionException
with the specified cause. The detail message is set to (cause == null ? null : cause.toString())
(which typically contains the class and detail message of cause
).
Parameters |
cause |
Throwable!: the cause (which is saved for later retrieval by the getCause() method) |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# RejectedExecutionException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nRejectedExecutionException\n==========================\n\n```\nopen class RejectedExecutionException : RuntimeException\n```\n\n|---|---|---|---|------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) ||||\n| | ↳ | [java.lang.Exception](../../lang/Exception.html#) |||\n| | | ↳ | [java.lang.RuntimeException](../../lang/RuntimeException.html#) ||\n| | | | ↳ | [java.util.concurrent.RejectedExecutionException](#) |\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [InlineExecutionProhibitedException](../../../android/net/http/InlineExecutionProhibitedException.html#) |----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [InlineExecutionProhibitedException](../../../android/net/http/InlineExecutionProhibitedException.html#) | Thrown when an executor runs a submitted runnable inline in [java.util.concurrent.Executor#execute(Runnable)](/reference/kotlin/java/util/concurrent/Executor#execute(java.lang.Runnable)) and [android.net.http.UrlRequest.Builder#setDirectExecutorAllowed](../../../android/net/http/UrlRequest.Builder.html#setDirectExecutorAllowed(kotlin.Boolean)) was not called. | |\n\nException thrown by an [Executor](/reference/kotlin/java/util/concurrent/Executor) when a task cannot be accepted for execution.\n\nSummary\n-------\n\n| Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [RejectedExecutionException](#RejectedExecutionException())`()` Constructs a `RejectedExecutionException` with no detail message. |\n| [RejectedExecutionException](#RejectedExecutionException(kotlin.String))`(`message:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Constructs a `RejectedExecutionException` with the specified detail message. |\n| [RejectedExecutionException](#RejectedExecutionException(kotlin.String,%20kotlin.Throwable))`(`message:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `cause:` `[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)!`)` Constructs a `RejectedExecutionException` with the specified detail message and cause. |\n| [RejectedExecutionException](#RejectedExecutionException(kotlin.Throwable))`(`cause:` `[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)!`)` Constructs a `RejectedExecutionException` with the specified cause. |\n\nPublic constructors\n-------------------\n\n### RejectedExecutionException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nRejectedExecutionException()\n```\n\nConstructs a `RejectedExecutionException` with no detail message. The cause is not initialized, and may subsequently be initialized by a call to [initCause](../../lang/Throwable.html#initCause(kotlin.Throwable)). \n\n### RejectedExecutionException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nRejectedExecutionException(message: String!)\n```\n\nConstructs a `RejectedExecutionException` with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to [initCause](../../lang/Throwable.html#initCause(kotlin.Throwable)).\n\n| Parameters ||\n|-----------|-------------------------------------------------------------------------------------------------------|\n| `message` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the detail message |\n\n### RejectedExecutionException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nRejectedExecutionException(\n message: String!, \n cause: Throwable!)\n```\n\nConstructs a `RejectedExecutionException` with the specified detail message and cause.\n\n| Parameters ||\n|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `message` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the detail message |\n| `cause` | [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)!: the cause (which is saved for later retrieval by the [getCause()](../../lang/Throwable.html#getCause()) method) |\n\n### RejectedExecutionException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nRejectedExecutionException(cause: Throwable!)\n```\n\nConstructs a `RejectedExecutionException` with the specified cause. The detail message is set to `(cause == null ? null : cause.toString())` (which typically contains the class and detail message of `cause`).\n\n| Parameters ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `cause` | [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)!: the cause (which is saved for later retrieval by the [getCause()](../../lang/Throwable.html#getCause()) method) |"]]