2.x: reintroduce OnErrorNotImplementedException for 0-1 argument subscribe()#5036
Conversation
Coverage: 95.51% |
|
(Messing with codecov settings, had to reopen this to trigger a webhook of theirs.) |
|
I couldn't get Travis re-execute the job, likely due to the problems they are facing right now (even though they claim its only MacOSX builds). |
|
So for the application usage it makes sense to re-throw everything of instance of My app became quite unstable with RxJava 2 because I'm silently swallowing errors and can't distinguish between my errors and errors thrown after I unsubscribed. Really looking forward for this change if it does what I think it does! |
|
If you are using |
| * Subscribes to this Completable and calls the given Action when this Completable | ||
| * completes normally. | ||
| * <p> | ||
| * If the Completable emits an error, it is wrapped into an |
There was a problem hiding this comment.
Now it's twice.
If the completable emits an error...
There was a problem hiding this comment.
Once with the note about OnErrorNotImplemented..., once as swallowed
There was a problem hiding this comment.
Great opportunity to post a PR!
This PR reintroduces the
OnErrorNotImplementedExceptionwrapper from 1.x and applies it to thesubscribe()methods that don't define anonErrorhandler.The errors are still routed to the
RxJavaPlugins.onErrorhandler but now wrapped withOnErrorNotImplementedException.This should help with cases where the developer forgot to add the handler and distinguish such unhandled errors from other undeliverable errors due to lifecycle limitations.