Throwable

expect open class Throwable(message: String?, cause: Throwable?)(source)

The base class for all errors and exceptions. Only instances of this class can be thrown or caught.

Since Kotlin

1.0

Parameters

message

the detail message string.

cause

the cause of this throwable.

Inheritors

actual open external class Throwable(message: String?, cause: Throwable?)(source)

The base class for all errors and exceptions. Only instances of this class can be thrown or caught.

Since Kotlin

1.1

Parameters

message

the detail message string.

cause

the cause of this throwable.

Inheritors

open class Throwable(val message: String?, val cause: Throwable?)(source)

The base class for all errors and exceptions. Only instances of this class can be thrown or caught.

Since Kotlin

1.0

Parameters

message

the detail message string.

cause

the cause of this throwable.

actual open class Throwable(val message: String?, val cause: Throwable?)(source)

The base class for all errors and exceptions. Only instances of this class can be thrown or caught.

Since Kotlin

1.3

Parameters

message

the detail message string.

cause

the cause of this throwable.

Inheritors

actual open class Throwable(val message: String?, val cause: Throwable?)(source)

The base class for all errors and exceptions. Only instances of this class can be thrown or caught.

Since Kotlin

1.8

Parameters

message

the detail message string.

cause

the cause of this throwable.

Inheritors

actual open class Throwable(val message: String?, val cause: Throwable?)(source)

The base class for all errors and exceptions. Only instances of this class can be thrown or caught.

Since Kotlin

1.8

Parameters

message

the detail message string.

cause

the cause of this throwable.

Inheritors

Constructors

Link copied to clipboard
expect constructor()
expect constructor(message: String?)
expect constructor(cause: Throwable?)
expect constructor(message: String?, cause: Throwable?)
actual constructor()
actual constructor(message: String?)
actual constructor(cause: Throwable?)
actual constructor(message: String?, cause: Throwable?)
constructor(message: String?)
constructor(cause: Throwable?)
constructor()
constructor(message: String?, cause: Throwable?)
actual constructor()
actual constructor(message: String?)
actual constructor(cause: Throwable?)
actual constructor(message: String?, cause: Throwable?)
actual constructor()
actual constructor(message: String?)
actual constructor(cause: Throwable?)
actual constructor(message: String?, cause: Throwable?)
actual constructor()
actual constructor(message: String?)
actual constructor(cause: Throwable?)
actual constructor(message: String?, cause: Throwable?)

Properties

Link copied to clipboard
expect open val cause: Throwable?
Since Kotlin 1.0
actual open val cause: Throwable?
Since Kotlin 1.1
open val cause: Throwable?
Since Kotlin 1.0
actual open val cause: Throwable?
Since Kotlin 1.3
actual open val cause: Throwable?
Since Kotlin 1.8
actual open val cause: Throwable?
Since Kotlin 1.8
Link copied to clipboard
expect open val message: String?
Since Kotlin 1.0
actual open val message: String?
Since Kotlin 1.1
open val message: String?
Since Kotlin 1.0
actual open val message: String?
Since Kotlin 1.3
actual open val message: String?
Since Kotlin 1.8
actual open val message: String?
Since Kotlin 1.8
Link copied to clipboard

Returns an array of stack trace elements representing the stack trace pertaining to this throwable.

Since Kotlin 1.0
Link copied to clipboard

Returns a list of all exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.4

Returns a list of all exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.4

Returns a list of all exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.4

Returns a list of all exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.4

Returns a list of all exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.8

Returns a list of all exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.8

Functions

Link copied to clipboard
expect fun Throwable.addSuppressed(exception: Throwable)

When supported by the platform, adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.4
actual fun Throwable.addSuppressed(exception: Throwable)

Adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.4
actual fun Throwable.addSuppressed(exception: Throwable)

When supported by the platform, adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.1
actual fun Throwable.addSuppressed(exception: Throwable)

Adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.4
actual fun Throwable.addSuppressed(exception: Throwable)

Adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.8
actual fun Throwable.addSuppressed(exception: Throwable)

Adds the specified exception to the list of exceptions that were suppressed in order to deliver this exception.

Since Kotlin 1.8
Link copied to clipboard

Returns an array of stack trace strings representing the stack trace pertaining to this throwable.

Since Kotlin 1.3
Link copied to clipboard

Returns a list of stack trace addresses representing the stack trace pertaining to this throwable.

Since Kotlin 1.3
Link copied to clipboard

Prints the detailed description of this throwable to the standard error output.

Since Kotlin 1.3
Link copied to clipboard

Prints the detailed description of this throwable to the standard output or standard error output.

Since Kotlin 1.4

Prints the detailed description of this throwable to console error output.

Since Kotlin 1.4
actual inline fun Throwable.printStackTrace()

Prints the detailed description of this throwable to the standard error output.

Since Kotlin 1.0

Prints the detailed description of this throwable to the specified stream.

Since Kotlin 1.0

Prints the detailed description of this throwable to the specified writer.

Since Kotlin 1.0
actual inline fun Throwable.printStackTrace()

Prints the detailed description of this throwable to the standard error output.

Since Kotlin 1.4

Prints the detailed description of this throwable to console error output.

Since Kotlin 1.8

Prints the detailed description of this throwable to console error output.

Since Kotlin 1.8
Link copied to clipboard

Returns the detailed description of this throwable with its stack trace.

Since Kotlin 1.4

Returns the detailed description of this throwable with its stack trace.

Since Kotlin 1.4

Returns the detailed description of this throwable with its stack trace.

Since Kotlin 1.4

Returns the detailed description of this throwable with its stack trace.

Since Kotlin 1.4

Returns the detailed description of this throwable with its stack trace.

Since Kotlin 1.8

Returns the detailed description of this throwable with its stack trace.

Since Kotlin 1.8
Link copied to clipboard
open override fun toString(): String
Since Kotlin 1.1
open override fun toString(): String

Returns the short description of this throwable consisting of the exception class name (fully qualified if possible) followed by the exception message if it is not null.

Since Kotlin 1.3
open override fun toString(): String

Returns the short description of this throwable consisting of the exception class name followed by the exception message if it is not null.

Since Kotlin 1.8
open override fun toString(): String

Returns the short description of this throwable consisting of the exception class name followed by the exception message if it is not null.

Since Kotlin 1.8