It seems that there are two kinds of error in RxJava:
onError
RxJavaPlugins.setErrorHandler
I am having some trouble understanding why this is. Questions:
onError
? You can find most of the design decisions on the Wiki pages for changes done for Rx2:
One important design requirement for 2.x is that no
Throwable
errors should be swallowed. This means errors that can't be emitted because the downstream's lifecycle already reached its terminal state or the downstream cancelled a sequence which was about to emit an error.
To ensure that errors are only handled by the onError()
consumer of the observer, you'd have to set the global handler to an empty consumer:
RxJavaPlugins.setErrorHandler(emptyConsumer());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With