All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kotlin.StandardJVM.kt Maven / Gradle / Ivy

There is a newer version: 2.1.0-Beta1
Show newest version
package kotlin

import java.io.PrintWriter
import java.io.PrintStream

/**
 * Allows a stack trace to be printed from Kotlin's [[Throwable]]
 */
public fun Throwable.printStackTrace(writer: PrintWriter): Unit {
    val jlt = this as java.lang.Throwable
    jlt.printStackTrace(writer)
}

/**
 * Allows a stack trace to be printed from Kotlin's [[Throwable]]
 */
public fun Throwable.printStackTrace(stream: PrintStream): Unit {
    val jlt = this as java.lang.Throwable
    jlt.printStackTrace(stream)
}

/**
 * Returns the stack trace
 */

public fun Throwable.getStackTrace(): Array {
    val jlt = this as java.lang.Throwable
    return jlt.getStackTrace()!!
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy