Throwable

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.

Constructors

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

Properties

Link copied to clipboard
open val cause: Throwable?
Since Kotlin 1.0
Link copied to clipboard
open val message: String?
Since Kotlin 1.0
Link copied to clipboard

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

Since Kotlin 1.0

Functions

Link copied to clipboard
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