https://kotlinlang.org logo
#coroutines
Title
# coroutines
n

Nikky

09/03/2018, 1:04 AM
so in my code currently it seems to ignore exceptions.. prints them but does not halt the app i start my main with runBlocking and do parallized wirk with launch() in a FixedThreadPoolContext one way i found to handle it is to wrap the entire code in try catch and do couroutineContext.cancel() on failures, but that seems very.. weird to stop working that suddenly
m

Martin Devillers

09/03/2018, 7:07 AM
Read the section on “Exception Handling” https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md#exception-handling
async
is one way to fix this
n

Nikky

09/03/2018, 10:42 AM
ohh that was the puzzlepiece i was missing..
3 Views