val scope = CoroutineScope(CoroutineExceptionHandler { ctx, e -> })
?
s
streetsofboston
10/04/2019, 10:53 AM
When an exception is thrown but not caught by a child-Coroutine in a scope with a supervisor job (SupervisorScope), its other child Coroutines keep running and the scope remains active.
Using a 'regular' scope with a CEH or not, the scope its Job and all its child-Coroutines will finish when one of its child-Coroutines throws but not catch an exception.
Providing a CEH that does nothing, does not prevent the scope from being canceled. A CEH will receive the exception instead of the uncaught-exception-handler, possibly preventing your app from crashing