Sarvesh Sharma
12/21/2020, 8:25 AMAlex Pogrebnyak
12/21/2020, 9:13 AMkpgalligan
12/21/2020, 2:36 PMSarvesh Sharma
12/21/2020, 7:05 PMkpgalligan
12/21/2020, 10:50 PMSo from what I can understand, every time an exception is thrown from the KMM module, we'll be able to get the stack trace from Kotlin, but not for an unhandled exception?Kotlin bubbles up exceptions in a manner similar to Java/JVM. Swift and Objc are different and exception bubbling up isn't as ingrained. If you call a Kotlin method from Swift/Objc, whatever happens after that border happens in "Kotlin land" with Kotlin rules. So, if you call code that throws an exception, you can catch it in Kotlin at any point up until it gets to the border of where you called it from Swift/Objc. If it gets to that point, it's "unhandled". By default, what happens then is the Kotlin runtime tells Swift/objc to abort. If you have Crashlytics set up as usual, you'll get an unhandled exception that will basically say Kotlin called abort. It will look something like this
Also, instead of generating a single crash, can we give the Kotlin stack trace for the hard crashes as well?I'm not sure I'm understanding the questions here. Just want to be clear, "hard crashes" that occurred after a Kotlin call will produce the hard crash record like the first screenshot, and an additional "handled" record with Kotlin info like the second screenshot. You can also catch and report handled exceptions without crashing.
Sarvesh Sharma
12/22/2020, 9:39 PM