kotlin.Throwable
Throwable
open class Throwable
The base class for all errors and exceptions. Only instances of this class can be thrown or caught.
Parameters
message
- the detail message string.
cause
- the cause of this throwable.
Constructors
Throwable(message: String?) Throwable(cause: Throwable?) Throwable() Throwable(message: String?, cause: Throwable?) The base class for all errors and exceptions. Only instances of this class can be thrown or caught. |
Properties
open val cause: Throwable? | |
open val message: String? |
Inherited Functions
open operator fun equals(other: Any?): Boolean Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements: | |
open fun hashCode(): Int Returns a hash code value for the object. The general contract of hashCode is: | |
open fun toString(): String Returns a string representation of the object. |
Extension Properties
val Throwable.stackTrace: Array<StackTraceElement> Returns an array of stack trace elements representing the stack trace pertaining to this throwable. |
Extension Functions
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. | |
fun Throwable.printStackTrace() Prints the stack trace of this throwable to the standard output. fun Throwable.printStackTrace(writer: PrintWriter) Prints the stack trace of this throwable to the specified writer. fun Throwable.printStackTrace(stream: PrintStream) Prints the stack trace of this throwable to the specified stream. |
© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/