the only way to prevent a crash is add a try block...
# coroutines
m
the only way to prevent a crash is add a try block inside
Copy code
someFunctionThatCrash
Can any1 explain this behavior to me please?
a
My guess it's the same story as with ExecutorServices in Java. If your thread gets exception and real code is not wrapped in try/catch(Throwable), then it'll suspend until you fetch result from the handle with
get()
method
m
yes, i realised that. wrapping into a coroutineScope propagates the exception to the parent. thank you anyway!