Stay organized with collections
Save and categorize content based on your preferences.
UnsupportedOperationException
open class UnsupportedOperationException : RuntimeException
Thrown to indicate that the requested operation is not supported.
This class is a member of the Java Collections Framework.
Summary
Public constructors |
Constructs an UnsupportedOperationException with no detail message.
|
Constructs an UnsupportedOperationException with the specified detail message.
|
Constructs a new exception with the specified detail message and cause.
|
Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause ).
|
Public constructors
UnsupportedOperationException
UnsupportedOperationException()
Constructs an UnsupportedOperationException with no detail message.
UnsupportedOperationException
UnsupportedOperationException(message: String!)
Constructs an UnsupportedOperationException with the specified detail message.
Parameters |
message |
String!: the detail message |
UnsupportedOperationException
UnsupportedOperationException(
message: String!,
cause: Throwable!)
Constructs a new exception with the specified detail message and cause.
Note that the detail message associated with cause
is not automatically incorporated in this exception's detail message.
Parameters |
message |
String!: the detail message (which is saved for later retrieval by the Throwable.getMessage() method). |
cause |
Throwable!: the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.) |
UnsupportedOperationException
UnsupportedOperationException(cause: Throwable!)
Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString())
(which typically contains the class and detail message of cause
). This constructor is useful for exceptions that are little more than wrappers for other throwables (for example, ).
Parameters |
cause |
Throwable!: the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.) |
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,["# UnsupportedOperationException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nUnsupportedOperationException\n=============================\n\n```\nopen class UnsupportedOperationException : 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](/reference/kotlin/java/lang/Exception) |||\n| | | ↳ | [java.lang.RuntimeException](/reference/kotlin/java/lang/RuntimeException) ||\n| | | | ↳ | [java.lang.UnsupportedOperationException](#) |\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [ReadOnlyBufferException](../nio/ReadOnlyBufferException.html#), [ReadOnlyFileSystemException](../nio/file/ReadOnlyFileSystemException.html#) |------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ReadOnlyBufferException](../nio/ReadOnlyBufferException.html#) | Unchecked exception thrown when a content-mutation method such as put or compact is invoked upon a read-only buffer. | | [ReadOnlyFileSystemException](../nio/file/ReadOnlyFileSystemException.html#) | Unchecked exception thrown when an attempt is made to update an object associated with a [read-only](../nio/file/FileSystem.html#isReadOnly()) `FileSystem`. | |\n\nThrown to indicate that the requested operation is not supported.\n\nThis class is a member of the [Java Collections Framework](https://developer.android.com//reference/java/util/package-summary.html#CollectionsFramework).\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [UnsupportedOperationException](#UnsupportedOperationException())`()` Constructs an UnsupportedOperationException with no detail message. |\n| [UnsupportedOperationException](#UnsupportedOperationException(kotlin.String))`(`message:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Constructs an UnsupportedOperationException with the specified detail message. |\n| [UnsupportedOperationException](#UnsupportedOperationException(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 new exception with the specified detail message and cause. |\n| [UnsupportedOperationException](#UnsupportedOperationException(kotlin.Throwable))`(`cause:` `[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)!`)` Constructs a new exception with the specified cause and a detail message of `(cause==null ? null : cause.toString())` (which typically contains the class and detail message of `cause`). |\n\nPublic constructors\n-------------------\n\n### UnsupportedOperationException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nUnsupportedOperationException()\n```\n\nConstructs an UnsupportedOperationException with no detail message. \n\n### UnsupportedOperationException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nUnsupportedOperationException(message: String!)\n```\n\nConstructs an UnsupportedOperationException with the specified detail message.\n\n| Parameters ||\n|-----------|-------------------------------------------------------------------------------------------------------|\n| `message` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the detail message |\n\n### UnsupportedOperationException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nUnsupportedOperationException(\n message: String!, \n cause: Throwable!)\n```\n\nConstructs a new exception with the specified detail message and cause.\n\nNote that the detail message associated with `cause` is *not* automatically incorporated in this exception's detail message.\n\n| Parameters ||\n|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `message` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the detail message (which is saved for later retrieval by the [Throwable.getMessage()](/reference/kotlin/java/lang/Throwable#getMessage()) method). |\n| `cause` | [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)!: the cause (which is saved for later retrieval by the [Throwable.getCause()](/reference/kotlin/java/lang/Throwable#getCause()) method). (A `null` value is permitted, and indicates that the cause is nonexistent or unknown.) |\n\n### UnsupportedOperationException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nUnsupportedOperationException(cause: Throwable!)\n```\n\nConstructs a new exception with the specified cause and a detail message of `(cause==null ? null : cause.toString())` (which typically contains the class and detail message of `cause`). This constructor is useful for exceptions that are little more than wrappers for other throwables (for example, ).\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 [Throwable.getCause()](/reference/kotlin/java/lang/Throwable#getCause()) method). (A `null` value is permitted, and indicates that the cause is nonexistent or unknown.) |"]]