You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have CoroutineExceptionHandler for exceptions in coroutines that originate from user code. Moreover, exceptions from user code are aggregated via parent-child relations and are handled on the top level.
This leaves us with the following problem. If there is an exception somewhere inside coroutines machinery itself (inside some core methods, see #773, for one example), then this exception could get caught, delivered to the parent, but, since it breaks the whole machinery, parent would never complete and we never report this exception, so it looks like everything just "hanged".
So, the proposal is to add try { ... } catch { ... } to sensitive methods in coroutine machinery where we know that exception can break invariants and report the corresponding exception immediately via the global handler that logs it or, at least, prints it the console. So this way, even though we cannot restore invariants and repair machinery, we would report the error in some way (see also discussion in #773)
The text was updated successfully, but these errors were encountered:
We have
CoroutineExceptionHandler
for exceptions in coroutines that originate from user code. Moreover, exceptions from user code are aggregated via parent-child relations and are handled on the top level.This leaves us with the following problem. If there is an exception somewhere inside coroutines machinery itself (inside some core methods, see #773, for one example), then this exception could get caught, delivered to the parent, but, since it breaks the whole machinery, parent would never complete and we never report this exception, so it looks like everything just "hanged".
So, the proposal is to add
try { ... } catch { ... }
to sensitive methods in coroutine machinery where we know that exception can break invariants and report the corresponding exception immediately via the global handler that logs it or, at least, prints it the console. So this way, even though we cannot restore invariants and repair machinery, we would report the error in some way (see also discussion in #773)The text was updated successfully, but these errors were encountered: