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

Request: Single.onErrorResumeNext(Func1<? super Throwable, Single<? extends T>> resumeFunction) #3731

Closed
ghost opened this issue Feb 24, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 24, 2016

To match Observable's.

public Single<V> onErrorResumeNext(Func1<? super Throwable, Single<? extends T>> resumeFunction);
@rtedin
Copy link

rtedin commented Feb 25, 2016

We are also interested in this feature. Currently we are in the process of switching Observable to Single where it makes sense. Not having this feature is blocking us. Since we would use this internally and not expose the details to users, does anybody know a workaround for accessing the Throwable?

@rtedin
Copy link

rtedin commented Feb 25, 2016

Since we are just interested in mapping the emitted exception to something else, here is something that just occurred to me. It's ugly, but it seems that it works as a temporary workaround in our use case. It may be useful for others too, so here it is:

single.onErrorReturn(throwable -> {
    throw mapException(throwable);
});

Where mapException maps the Throwable to one of our exceptions.

@vanniktech
Copy link
Collaborator

Isn't this a dupe of #3440 ?

@rtedin
Copy link

rtedin commented Feb 25, 2016

Yes, you're right. It's a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants