Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Commit

Permalink
Try to circumvent problem with JsLegacy
Browse files Browse the repository at this point in the history
  • Loading branch information
soywiz committed Jun 26, 2021
1 parent 6a4ef1f commit e14fcee
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions korio/src/jsMain/kotlin/com/soywiz/korio/lang/ExceptionsJs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ actual open class FileNotFoundException actual constructor(msg: String) : IOExce

actual fun Throwable.printStackTrace() {
val e = this
console.error(e.asDynamic())
console.error(e.asDynamic().stack)
try {
console.error(e.asDynamic())
console.error(e.asDynamic().stack)
} catch (e: dynamic) {
console.error("Error logging into console")
try {
console.error(e)
} catch (e: dynamic) {
}
}
}

actual fun enterDebugger() {
js("debugger;")
}
}

0 comments on commit e14fcee

Please sign in to comment.