Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global handler for fatal errors in coroutine machinery #808

Closed
elizarov opened this issue Nov 7, 2018 · 0 comments
Closed

Global handler for fatal errors in coroutine machinery #808

elizarov opened this issue Nov 7, 2018 · 0 comments
Assignees

Comments

@elizarov
Copy link
Contributor

elizarov commented Nov 7, 2018

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)

@qwwdfsad qwwdfsad self-assigned this Feb 27, 2019
qwwdfsad added a commit that referenced this issue Mar 7, 2019
…ption instead of rethrowing it to provide faster feedback loop

Fixes #808
Fixes #773
qwwdfsad added a commit that referenced this issue Mar 13, 2019
…ption instead of rethrowing it to provide faster feedback loop

Fixes #808
Fixes #773
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants