-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
OnErrorFailedException fix #3455
Conversation
@@ -76,12 +76,7 @@ public static void throwIfFatal(Throwable t) { | |||
if (t instanceof OnErrorNotImplementedException) { | |||
throw (OnErrorNotImplementedException) t; | |||
} else if (t instanceof OnErrorFailedException) { | |||
Throwable cause = t.getCause(); | |||
if (cause instanceof RuntimeException) { | |||
throw (RuntimeException) cause; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess by preventing the unwrapping, the error keeps propagating up, therefore, this change is essential. However, there could be code out there that depended on the original behavior (since Exceptions is part of the public API).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that there is such code. Such unwrapped exceptions were swallowed most of the time anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting bug. I agree that removing the unwrapping is needed.
Looks good to me. 👍 |
Could you also fix the similar issues in
|
I would replace error handling in both of these methods with simple
However, I think that the problem should be handled more generally. |
Thanks for digging in to help with this. I thought we had squashed all of these swallowing of errors! Apparently not :-( |
👍 Go ahead with this @akarnokd if you're still good with it. |
It is good as it is. Merging. The thing @zsxwing asked for can be done in a separate PR. |
#2998