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 error handling in onBackpressureBuffer #3639

Merged

Conversation

davidmoten
Copy link
Collaborator

onOverflow.call() was not wrapped in an appropriate try catch to prevent the error from being reported from an upstream operator.

This PR includes a unit test that failed on the original code.

@akarnokd akarnokd added the Bug label Jan 23, 2016
@akarnokd
Copy link
Member

👍

} catch (Throwable e) {
Exceptions.throwIfFatal(e);
manager.terminateAndDrain(e);
// this line not strictly necessary but nice for clarity
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@artem-zinnatullin
Copy link
Contributor

👍

try {
onOverflow.call();
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
Copy link
Member

Choose a reason for hiding this comment

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

Need to notify the plugin instead of swallowing the non fatal exceptions.

Copy link
Member

Choose a reason for hiding this comment

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

It does not swallow it but emits via L164 to the child subscriber.

Copy link
Member

Choose a reason for hiding this comment

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

yeah. Didn't notice that

@zsxwing
Copy link
Member

zsxwing commented Jan 24, 2016

👍

akarnokd added a commit that referenced this pull request Jan 25, 2016
…or-handling

fix error handling in onBackpressureBuffer
@akarnokd akarnokd merged commit b7b71d1 into ReactiveX:1.x Jan 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants