https://kotlinlang.org logo
Title
i

ivan.savytskyi

10/29/2018, 11:58 PM
fun main(vararg args: String) = runBlocking {
    try {
        val deferred = async {
            println("Throwing exception from async")
            throw ArithmeticException() // Nothing is printed, relying on user to call await
        }
        deferred.await()
        println("Unreached")
    } catch (e: ArithmeticException) {
        println("Caught ArithmeticException")
    }
}
h

Hadi Tok

10/30/2018, 9:58 PM
review this -> https://github.com/Kotlin/kotlinx.coroutines/issues/691 so thereis no straight forward way to fix this as far as i can see. @abhi