-
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
Change onError(Exception) to onError(Throwable) - Issue #296 #315
Change onError(Exception) to onError(Throwable) - Issue #296 #315
Conversation
- Was no longer working once onError(Exception) changed to onError(Throwable) as the assertions throwing java.lang.Error no longer bypassed the composed Observables. - It was confusing while locally contextual JUnit verifications as used everywhere else are clear, readable and localized to each test
- spying was removed since it wasn't being used and ImmediateScheduler results in no scheduling being done.
See issue "Observer#onError should use Throwable" for background => ReactiveX#296
See ReactiveX#296 (comment) for context.
RxJava-pull-requests #190 SUCCESS |
* <p> | ||
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/onErrorResumeNext.png"> | ||
* <p> | ||
* By default, when an Observable encounters an error that prevents it from emitting the |
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.
Perhaps just replace this block with @see onErrorResumeNext
? It still refers to the former method rather than onExceptionResumeNext
which might be confusing to read.
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.
The only part of it that wasn't changed to be specific is the image: onErrorResumeNext.png
I haven't had time to create a new marble diagram but that will come. Most likely @DavidMGross will beat me to it before I get to it.
The rest of the comment is important I feel as it explains the difference from onErrorResumeNext:
... if it encounters an error of type {@link java.lang.Exception}.
This differs from {@link #onErrorResumeNext} in that this one does not handle {@link java.lang.Throwable} or {@link java.lang.Error} but lets those continue through.
diff isn't easy to unveil pitfalls, as Might be worthwhile doing a visual scan via reference check or string search in the ide where |
another option would be to make static utility methods like guava's ex. catch (Throwable e) {
thingThatTakesException.signal(asException(e));
propagateIfError(e);
} |
This change is very bad for reviewing with a diff that only include a couple lines on either side. When I review the 60+ files before submitting the pull request I had to keep flipping back to the full source code to read the context. It's just the nature of the change ... |
RxJava-pull-requests #191 SUCCESS |
This already exists in RxJava ( |
RxJava-pull-requests #192 SUCCESS |
Cool sounds like an easy adjustment then! On Thursday, August 1, 2013, Ben Christensen wrote:
|
… test the Throwable catch instead of Exception.
RxJava-pull-requests #193 SUCCESS |
Moving forward with the merge ... |
Change onError(Exception) to onError(Throwable) - Issue #296
…wable Change onError(Exception) to onError(Throwable) - Issue ReactiveX#296
This changes
Observer#onError(Exception e)
toObserver#onError(Throwable e)
See "Observer#onError should use Throwable" #296 for discussion that led to this change.
This is a breaking change and will result in a version bump from 0.9.x to 0.10.x.