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

Fix the bug that 'flatMap' swallows OnErrorNotImplementedException #1367

Merged
merged 1 commit into from
Jun 21, 2014

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented Jun 17, 2014

Fixed #1365
Not sure if any other place will swallow OnErrorNotImplementedException or the fatal errors.

@cloudbees-pull-request-builder

RxJava-pull-requests #1292 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

RxJava-pull-requests #1293 SUCCESS
This pull request looks good

benjchristensen added a commit that referenced this pull request Jun 21, 2014
Fix the bug that 'flatMap' swallows OnErrorNotImplementedException
@benjchristensen benjchristensen merged commit 2944606 into ReactiveX:master Jun 21, 2014
@zsxwing zsxwing deleted the swallow-error branch June 22, 2014 13:51
@mofleury
Copy link

Hi all,

I'm new here, so I may be missing something, but I'm afraid that this issue should not be closed just yet.

Indeed, it looks like there is still a problem if there is more than one flatMap in the chain.

Here is a unit test to reproduce the bug (I used the previous unit test that was added as part of this bugfix, and simply added an additional flatMap stage) :

    @Test(expected = OnErrorNotImplementedException.class)
    public void testSubscribeWithoutOnError() {
        Observable.just("a", "b")
        .flatMap(s -> Observable.just(s + "1", s + "2"))
        .flatMap(s -> Observable.error(new Exception("test")))
        .forEach(System.out::println);
    }

The output I get is nothing, and no error either.

Should I submit a new issue, or can you reopen this one?

Thanks!

@rekhajoshm
Copy link

Think the issue still exists, there needs to be clear functionality by which exception can be cleanly trapped and rethrown if needed(user preference) to upper layers.thanks

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

Successfully merging this pull request may close these issues.

None yet

5 participants