-
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
Add Single.doOnError() #3419
Add Single.doOnError() #3419
Conversation
/** | ||
* Modifies the source {@link Single} so that it invokes an action if it calls {@code onError}. | ||
* <p> | ||
* In case the onError action throws, the downstream will receive a composite exception containing |
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.
Could you add an unit test that verifies this?
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.
Added doOnErrorShouldThrowCompositeExceptionIfOnErrorActionThrows()
* @return the source {@link Single} with the side-effecting behavior applied | ||
* @see <a href="http://reactivex.io/documentation/operators/do.html">ReactiveX operators documentation: Do</a> | ||
*/ | ||
public final Single<T> doOnError(final Action1<Throwable> onError) { |
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.
This should start out as experimental unless the RxJava contributors want to fast-track this.
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.
Added @Experimental
3f6e2db
to
2d832a4
Compare
👍 |
1 similar comment
👍 |
No description provided.