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

1.x: Add Single.onErrorResumeNext(Single) #3655

Merged

Conversation

artem-zinnatullin
Copy link
Contributor

Part of #3652, will submit a PR for onErrorResumeNext(Func1<Throwable, Single>) later.

@artem-zinnatullin artem-zinnatullin changed the title Add Single.onErrorResumeNext(Single) 1.x: Add Single.onErrorResumeNext(Single) Jan 29, 2016
import rx.exceptions.Exceptions;
import rx.plugins.RxJavaPlugins;

public class SingleOperatorOnErrorResumeNextViaSingle<T> implements Operator<T, T> {
Copy link
Member

Choose a reason for hiding this comment

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

Why not implement this via SingleOnSubscribe and then you have access to SingleSubscriber without the API mismatch with backpressured Operators?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, will do.

On Fri, 29 Jan 2016, 11:08 David Karnok notifications@github.com wrote:

In
src/main/java/rx/internal/operators/SingleOperatorOnErrorResumeNextViaSingle.java
#3655 (comment):

@@ -0,0 +1,67 @@
+package rx.internal.operators;
+
+import rx.Observable.Operator;
+import rx.Producer;
+import rx.Single;
+import rx.Subscriber;
+import rx.exceptions.Exceptions;
+import rx.plugins.RxJavaPlugins;
+
+public class SingleOperatorOnErrorResumeNextViaSingle implements Operator<T, T> {

Why not implement this via SingleOnSubscribe and then you have access to
SingleSubscriber without the API mismatch with backpressured Operators?


Reply to this email directly or view it on GitHub
https://github.com/ReactiveX/RxJava/pull/3655/files#r51234767.

@artem_zin

@artem-zinnatullin
Copy link
Contributor Author

@akarnokd changed to implements Single.OnSubscribe! PTAL

@akarnokd
Copy link
Member

👍

@artem-zinnatullin
Copy link
Contributor Author

@zsxwing PTAL :)

@zsxwing
Copy link
Member

zsxwing commented Feb 3, 2016

👍

zsxwing added a commit that referenced this pull request Feb 3, 2016
…extViaSingle

1.x: Add Single.onErrorResumeNext(Single)
@zsxwing zsxwing merged commit 90e0423 into ReactiveX:1.x Feb 3, 2016
@stevegury
Copy link
Member

👍

@artem-zinnatullin artem-zinnatullin deleted the single-onErrorResumeNextViaSingle branch March 15, 2016 20:16
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.

4 participants