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

2.x: doOnSubscribe() does not propagate Exception to the onError() #5105

Closed
arazabishov opened this issue Feb 17, 2017 · 1 comment
Closed

Comments

@arazabishov
Copy link

There is a PublishProcessor which calls .doOnSubscribe(checkCondition) operator to perform certain check. checkCondition is intended to throw UnsupportedOperationException, which then has to be propagated to the subscriber down the stream to onError() method. Instead, UndeliverableException is being thrown and process crashes.

publishProcessor
    .filter(() -> { // predicate })
    .observeOn(scheduler)
    .doOnSubscribe(checkCondition)
    .to((sourceFlowable) -> new FancyFlowable(sourceFlowable)))
    .safeSubscribe(subscriber);

P.S. This is a cross-post from stackoverflow. According to the @akarnokd, this is issue of RxJava2's doOnSubscribe().

@arazabishov
Copy link
Author

arazabishov commented Feb 17, 2017

My apologies for being not very attentive, pull-request to fix this issue has already been submitted: #5103. Thanks @akarnokd.

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

No branches or pull requests

1 participant