touchlab / Kermit

Kermit by Touchlab is a Kotlin Multiplatform centralized logging utility.
https://kermit.touchlab.co
Apache License 2.0
702 stars 40 forks source link

Try to repro non-crashing issue #257

Closed kpgalligan closed 2 years ago

kpgalligan commented 2 years ago

https://kotlinlang.slack.com/archives/CTJB58X7X/p1655287237689619

The problem is that it swallows crashes leading to really unexpected application states. Let’s say you call a function like this from swift:

public fun launchCrash() {
  GlobalScope.launch {
    throw AssertionError("Let's die")
  }
}

If you do not have the kermit crash hook installed, it kills your process. If you have the kermit crash hook installed, it will log an error but the application won’t crash. That’s a really bad sideffect