What would be the best way to ensure an exception ...
# coroutines
u
What would be the best way to ensure an exception in a coroutine leads to a programm crash (e.g. because it's handled by the UI thread's
uncaughtExceptionHandler
)
Copy code
private fun crashes() = launch(UI) {
    throw IllegalStateException()
}

 private fun doesNotCrash() = launch(Job() + UI) {
     throw IllegalStateException()
 }
The second one just cancels the job, but I would really like for it to also crash the app.