RxJava 2.0.6 : New undeliverable error handling
See original GitHub issueIn the release docs of 2.0.6 it is stated that
If an undeliverable exception is an instance/descendant of NullPointerException, IllegalStateException (UndeliverableException and ProtocolViolationException extend this), IllegalArgumentException, CompositeException, MissingBackpressureException or OnErrorNotImplementedException, the UndeliverableException wrapping doesn’t happen.
What is the reason for that? Also I cannot confirm this behaivor. If I understand correctly
RxJavaPlugins.setErrorHandler(throwable -> {
if (throwable instanceof OnErrorNotImplementedException) {
throw new RuntimeExecutionException(throwable);
}
Timber.e(throwable, "Error handler reported");
});
Single.fromCallable(() -> {
throw new IllegalArgumentException();
}).subscribe(o -> Timber.d("onSuccess"));
This should not be wrapped and thus not be re-thrown. But it is.
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (18 by maintainers)
Top Results From Across the Web
RxJava2 UndeliverableException - ProAndroidDev
Today I started to got an error from Firebase Testlab due to UndeliverableException like below io.reactivex.exceptions.
Read more >The RxJava2 Default Error Handler | by Bryan Herbst - Medium
OnErrorNotImplementedException is one of the “bug” cases that RxJava does not wrap in an UndeliverableException , since it generally means that ...
Read more >java - io.reactivex.exceptions.UndeliverableException The ...
My question is where should I write this code. I have a Micronaut application using java or this is the only way to...
Read more >Standard Error Handler in RxJava2 or why RxJava causes the ...
Starting with the version 2.0.6 , it RxJavaPlugins.onError tries to be smarter and shares the library / implementation errors and situations ...
Read more >io.reactivex.exceptions.UndeliverableException Java Examples
setErrorHandler(e -> { if (e instanceof UndeliverableException) { // As ... new RuntimeException("Unexpected Throwable in RxJavaPlugins error handler", ...
Read more >
Top Related Medium Post
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Don’t rethrow and let the app crash. On Android, you can call
Thread.currentThread().getUncaughtExceptionHandler().handleException(throwable)
and it will crash the app for you.Looks like this question has been answered. If you have further input on the issue, don’t hesitate to reopen this issue or post a new one.