-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Documentation and custom ErrorHandler for Single.fromCallable(.) #6183
Conversation
- Added doc for Single.fromCallable(.) to clarify on handling of UndeliverableExceptions. - Proposing custom ErrorHandler for Single.fromCallable to have a more granular Interface than just to have some global RxJavaPlugins class, which handles UndeliverableExceptions. They shouldn't be swallowed, if they aren't expected, but for expected ones, it should be possible to handle them individually. If approved, this should be extended to Observable, etc.
Updating the docs is fine, provided you go along the line proposed by #6179. However, I don't support adding a new overload and changing the existing operator implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please just update the docs only.
ok, never mind - would just have been useful... will have to continue using "workarounds" then... |
You could implement it yourself the way you see fit, even taking RXJava's implementation by source and having it in your project/library. |
yeah - and rebasing each and every new "original" version? no thanks... ;-) |
Assuming this PR would have been accepted, doesn't it mean you'd have to go around and add all those handlers anyway?
Just because you don't see the value of some operator, it doesn't mean its superfluous. Unfortunately, many would see RxJava tailored to their exact local needs, which is generally unsustainable. |
yup, but that would be once. For my local needs, I built my own extensions - I was asking for tailoring to JAva-Specification, wich has Callable throwing an Exception. (Not allowing an Exception would mean forcing a return-value, even if cancelled...) But it's ok, I built another utility-class to fix that issue on my own. |
Relating to #6178, a proposal for a solution containing a custom ErrorHandler.
UndeliverableExceptions.
granular Interface than just to have some global RxJavaPlugins class,
which handles UndeliverableExceptions. They shouldn't be swallowed, if
they aren't expected, but for expected ones, it should be possible to
handle them individually.
If approved, this should be extended to Observable, etc.
Thank you for contributing to RxJava. Before pressing the "Create Pull Request" button, please consider the following points:
[ ✔ ] Please give a description about what and why you are contributing, even if it's trivial.
[ ✔ ] Please include the issue list number(s) or other PR numbers in the description if you are contributing in response to those.
[ ✔ ] Please include a reasonable set of unit tests if you contribute new code or change an existing one. If you contribute an operator, (if applicable) please make sure you have tests for working with an
empty
,just
,range
of values as well as anerror
source, with and/or without backpressure and see if unsubscription/cancellation propagates correctly.