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

Commit e14fcee

Browse files
committed
Try to circumvent problem with JsLegacy
1 parent 6a4ef1f commit e14fcee

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

korio/src/jsMain/kotlin/com/soywiz/korio/lang/ExceptionsJs.kt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@ actual open class FileNotFoundException actual constructor(msg: String) : IOExce
66

77
actual fun Throwable.printStackTrace() {
88
val e = this
9-
console.error(e.asDynamic())
10-
console.error(e.asDynamic().stack)
9+
try {
10+
console.error(e.asDynamic())
11+
console.error(e.asDynamic().stack)
12+
} catch (e: dynamic) {
13+
console.error("Error logging into console")
14+
try {
15+
console.error(e)
16+
} catch (e: dynamic) {
17+
}
18+
}
1119
}
1220

1321
actual fun enterDebugger() {
1422
js("debugger;")
15-
}
23+
}

0 commit comments

Comments
 (0)