-
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
CompositeException fix for Android #1431
Conversation
…hing stacks, but instead" This reverts commit f4ae92a.
RxJava-pull-requests #1385 FAILURE |
This will take a while to review as those changes were done for good reason. |
Maybe I should provide some explanation about what was wrong with the previous implementation. Here's how most of Java programmers will rethrow an exception if not handled:
Now we have
The previous implementation will create a loop in this situation:
I've provided test for this scenario and additional method to remove throwables which are causes of another throwable. It means
|
/cc @mattrjacobs Matt, can you get involved here (now that you're back) since you have the most recent history and context in this code. Discussion at #1405 |
Given the new constraint that Android does something unexpected (to me anyway) with the set of printStackTrace methods, it's probably preferable to modify the structure of CompositeException, so that any arbitrary output of a CompositeException is correct. Relying on the implementation details of precisely how Android does the printStackTrace doesn't protect us from any other edge cases. So I generally think the sort of change proposed by @tomrozb is good - I'm validating what the output looks like in our prod env now. Thanks @tomrozb for the PR. |
I'm merging this now, thanks for the clear explanation, and fix with a test, @tomrozb. |
CompositeException fix for Android
Thanks @mattrjacobs and @tomrozb |
Fixes #1405