Open JakeWharton opened 2 years ago
We got this for free when we moved to Result
types as return values. When we forward an exception we put the JS stacktrace into a ZiplineException
.
We’re still not simplifying the stacktrace in native as aggressively as we do on the JVM. https://github.com/cashapp/zipline/blob/trunk/zipline/src/jniMain/kotlin/app/cash/zipline/internal/bridge/throwablesJni.kt#L35
I think I’ve taken this as far as it can go without user-defined stacktraces in Kotlin/Native.
I’ve opened a tracking issue to request that feature: https://youtrack.jetbrains.com/issue/KT-59017/New-API-for-Kotlin-Native-Throwable.setStackTraceArrayString
If/when that’s complete, we can un-icebox this.
We can pack it in the message for now so it's not lost. We can also put
message
andstacktrace
properties onQuickJsException
for native and do something fancy in the future to assist crash reporting tools.@kpgalligan