wcaokaze
11/05/2018, 11:59 AMlaunch {
try {
async { throw IOException() }.await()
} catch (e: IOException) {
}
}
I get an uncaught IOException. What is wrong?wcaokaze
11/05/2018, 12:04 PMasync {
try {
async { throw IOException() }.await()
} catch (e: IOException) {
}
}
I get no Exception.Jonathan
11/05/2018, 12:21 PMasync is a child of launch making it fail imediately.Jonathan
11/05/2018, 12:21 PMasync it is the same, but exception is not logged, because you're supposed to call awaitJonathan
11/05/2018, 12:22 PMJonathan
11/05/2018, 12:23 PMJonathan
11/05/2018, 12:24 PMasync only for parallel decomposition. For other uses-cases just use suspending functions (without using async at all)wcaokaze
11/05/2018, 12:41 PM