godot.core.bridge.ExceptionHandler.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of godot-library-debug Show documentation
Show all versions of godot-library-debug Show documentation
Contains godot api as kotlin classes and jvm cpp interaction code.
@file:Suppress("PackageDirectoryMismatch")
package godot.core
object JvmStackTrace {
fun getExceptionStackTrace(throwable: Throwable): String {
return throwable.stackTraceToString()
}
// TODO: Use this method to get the JVM stacktrace when Godot will add the features to script https://github.com/godotengine/godot/pull/91006
fun getCurrentStacktrace() = Thread.currentThread().stackTrace.joinToString("\n")
}