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

Observer.empty() vs EmptyObserver #1741

Closed
benjchristensen opened this issue Oct 10, 2014 · 3 comments
Closed

Observer.empty() vs EmptyObserver #1741

benjchristensen opened this issue Oct 10, 2014 · 3 comments

Comments

@benjchristensen
Copy link
Member

The behavior between Observer.empty() and EmptyObserver is different. This seems confusing.

EmptyObserver swallows errors whereas Observer.empty() will throw OnErrorNotImplementedException if onError is invoked.

Thoughts on what we should do?

@benjchristensen
Copy link
Member Author

I think deleting EmptyObserver is the best approach. It serves no value.

benjchristensen added a commit to benjchristensen/RxJava that referenced this issue Oct 10, 2014
It creates no value and confuses with Observers.empty() which throws an OnErrorNotImplementedException if onError is invoked.
Fixes ReactiveX#1741
@benjchristensen
Copy link
Member Author

I deleted EmptyObserver and updated the Observers.empty() javadocs to be clear that it throws OnErrorNotImplementedException.

If someone wants to swallow errors they need to actively code for that. RxJava will not swallow errors itself.

@headinthebox
Copy link
Contributor

Like!

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

2 participants