Evgeniy Zaharov
06/20/2018, 3:14 PMfun test() {
try {
method()
} catch (e: Throwable) {
println("method-catch")
}
}
private fun method() = runBlocking {
try {
val job = launch {
try {
repeat(5) {
if (it == 3) throw RuntimeException("opps")
println(123)
delay(100)
}
} catch (e: Throwable) {
println("inner-catch")
throw e
}
}
job.join()
} catch (e: Throwable) {
println("out-catch")
throw e
}
}
i see only this:
123
123
123
inner-catch
and there is no method-catch
?