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

2.x: Adjust Undeliverable & OnErrorNotImpl message to use full inner exception #6236

Merged
merged 1 commit into from
Oct 3, 2018

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Oct 3, 2018

With UndeliverableException and OnErrorNotImplementedException, the wrapped exception may not have a message and the top line simply contains an unhelpful null:

io.reactivex.exceptions.UndeliverableException: The exception could not be delivered to the 
        consumer because it has already canceled/disposed the flow or the exception 
        has nowhere to go to begin with. Further reading: 
        https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | null
    at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
    at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter
        .onError(ObservableCreate.java:73)
    at io.reactivex.internal.operators.observable.ObservableCreate
        .subscribeActual(ObservableCreate.java:43)
    at io.reactivex.Observable.subscribe(Observable.java:12090)
 Caused by: java.io.InterruptedIOException

This PR adds the full toString() value of the wrapped exception to the main line. This is also more useful when the user posting the stacktrace doesn't provide the Caused by: part for some reason.

@akarnokd akarnokd added this to the 2.2 backlog milestone Oct 3, 2018
@codecov
Copy link

codecov bot commented Oct 3, 2018

Codecov Report

Merging #6236 into 2.x will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6236      +/-   ##
============================================
- Coverage     98.28%   98.23%   -0.05%     
- Complexity     6201     6203       +2     
============================================
  Files           667      667              
  Lines         44887    44887              
  Branches       6216     6216              
============================================
- Hits          44117    44096      -21     
- Misses          239      248       +9     
- Partials        531      543      +12
Impacted Files Coverage Δ Complexity Δ
...o/reactivex/exceptions/UndeliverableException.java 100% <100%> (ø) 1 <1> (ø) ⬇️
...vex/exceptions/OnErrorNotImplementedException.java 100% <100%> (ø) 3 <1> (-1) ⬇️
.../operators/observable/ObservableFlatMapSingle.java 88.8% <0%> (-6.72%) 2% <0%> (ø)
...nternal/operators/parallel/ParallelReduceFull.java 91.08% <0%> (-3.97%) 2% <0%> (ø)
...ternal/operators/completable/CompletableMerge.java 96.42% <0%> (-2.39%) 2% <0%> (ø)
...nternal/operators/parallel/ParallelSortedJoin.java 92.7% <0%> (-2.19%) 2% <0%> (ø)
...x/internal/operators/flowable/FlowablePublish.java 97.44% <0%> (-2.13%) 11% <0%> (ø)
...nternal/operators/observable/ObservableWindow.java 98% <0%> (-2%) 3% <0%> (ø)
...l/operators/observable/ObservableFlatMapMaybe.java 94.77% <0%> (-1.97%) 2% <0%> (ø)
...ernal/operators/flowable/FlowableTimeoutTimed.java 97.56% <0%> (-1.63%) 3% <0%> (ø)
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a04ade5...b70a31a. Read the comment docs.

Copy link
Contributor

@artem-zinnatullin artem-zinnatullin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@akarnokd akarnokd merged commit 2ad63c4 into ReactiveX:2.x Oct 3, 2018
@akarnokd akarnokd deleted the UndeliverableDefaultMsgFix branch October 3, 2018 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants