Crap, I’ve just wasted an entire hour due to extra pair of curly braces.
I wrote this:
val exceptionHandler = CoroutineExceptionHandler { _, throwable -> {
println("Caught exception")
}}
But the correct way of using that is this:
val exceptionHandler = CoroutineExceptionHandler { _, throwable ->
println("Caught exception")
}
Then it works.
CLICK HERE to find out more related problems solutions.