-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
CancellationException behaviour #2618
Comments
Transparent means that the original exception gets propagated up to the parent. If the child crashed due to IOException, then an IOException gets propagated up. Your example outputs Does it help? |
Yes, it's helpful, but what means unwrapped?Does it relate to CancellationException or any throwable? |
How CancellationException is propagating up in the hierarchy and is it just ignored by cancelation exception handler?What about cause of this exception?Could it be used as a suppressed exception for the first "caught" exception? |
Here "unwrapped" means that the propagated cause is not wrapped into a kind of |
Maybe I'm stupid, but I still have a question:
*# 1. Exception thrown, cancelling coroutine 1 and propagate to the parent 2 What is unwrapped in this case and what role CancellationException with cause IOException took in this situation, I still couldn't get it? |
The However, whenever you |
Thank you! |
I checked docs for it and as I understand, this exception is not uncaught, it notifies the parent about cancelation and parent treat this exception as normal reason.
My question is - does it still propagates to next parent and possibly finishes in the handler, that ignores it?
Because it's not very clear from documentation side, how does it propagates.
Also, what this statement in the documentation mean:
Output:
What does it mean transparent and unwrapped?
This example show that cause will not be used in the handler:
Output:
I found in the code base this functions:
But they ignore cancelation exceptions at all.
The text was updated successfully, but these errors were encountered: