Stay organized with collections
Save and categorize content based on your preferences.
SSLException
open class SSLException : IOException
Indicates some kind of error detected by an SSL subsystem. This class is the general class of exceptions produced by failed SSL-related operations.
Summary
Public constructors |
Constructs an exception reporting an error found by an SSL subsystem.
|
Creates a SSLException with the specified detail message and cause.
|
Creates a SSLException 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
SSLException
SSLException(reason: String!)
Constructs an exception reporting an error found by an SSL subsystem.
Parameters |
reason |
String!: describes the problem. |
SSLException
SSLException(
message: String!,
cause: Throwable!)
Creates a SSLException
with the specified detail message and cause.
Parameters |
message |
String!: the detail message (which is saved for later retrieval by the getMessage() method). |
cause |
Throwable!: the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.) |
SSLException
SSLException(cause: Throwable!)
Creates a SSLException
with the specified cause and a detail message of (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). (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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# SSLException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nSSLException\n============\n\n```\nopen class SSLException : IOException\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](../../../java/lang/Exception.html#) |||\n| | | ↳ | [java.io.IOException](../../../java/io/IOException.html#) ||\n| | | | ↳ | [javax.net.ssl.SSLException](#) |\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [SSLHandshakeException](/reference/kotlin/javax/net/ssl/SSLHandshakeException), [SSLKeyException](/reference/kotlin/javax/net/ssl/SSLKeyException), [SSLPeerUnverifiedException](/reference/kotlin/javax/net/ssl/SSLPeerUnverifiedException), [SSLProtocolException](/reference/kotlin/javax/net/ssl/SSLProtocolException) |------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------| | [SSLHandshakeException](/reference/kotlin/javax/net/ssl/SSLHandshakeException) | Indicates that the client and server could not negotiate the desired level of security. | | [SSLKeyException](/reference/kotlin/javax/net/ssl/SSLKeyException) | Reports a bad SSL key. | | [SSLPeerUnverifiedException](/reference/kotlin/javax/net/ssl/SSLPeerUnverifiedException) | Indicates that the peer's identity has not been verified. | | [SSLProtocolException](/reference/kotlin/javax/net/ssl/SSLProtocolException) | Reports an error in the operation of the SSL protocol. | |\n\nIndicates some kind of error detected by an SSL subsystem. This class is the general class of exceptions produced by failed SSL-related operations.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [SSLException](#SSLException(kotlin.String))`(`reason:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Constructs an exception reporting an error found by an SSL subsystem. |\n| [SSLException](#SSLException(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)!`)` Creates a `SSLException` with the specified detail message and cause. |\n| [SSLException](#SSLException(kotlin.Throwable))`(`cause:` `[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)!`)` Creates a `SSLException` 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### SSLException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nSSLException(reason: String!)\n```\n\nConstructs an exception reporting an error found by an SSL subsystem.\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------|\n| `reason` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: describes the problem. |\n\n### SSLException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nSSLException(\n message: String!, \n cause: Throwable!)\n```\n\nCreates a `SSLException` 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 (which is saved for later retrieval by the [getMessage()](../../../java/lang/Throwable.html#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 [getCause()](../../../java/lang/Throwable.html#getCause()) method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.) |\n\n### SSLException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nSSLException(cause: Throwable!)\n```\n\nCreates a `SSLException` 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\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()](../../../java/lang/Throwable.html#getCause()) method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.) |"]]