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

Add Single.doOnError() #3419

Merged
merged 1 commit into from
Oct 8, 2015

Conversation

artem-zinnatullin
Copy link
Contributor

No description provided.

/**
* 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
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added doOnErrorShouldThrowCompositeExceptionIfOnErrorActionThrows()

@akarnokd akarnokd added this to the 1.0.x milestone Oct 8, 2015
* @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) {
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added @Experimental

@akarnokd
Copy link
Member

akarnokd commented Oct 8, 2015

👍

1 similar comment
@abersnaze
Copy link
Contributor

👍

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