In RxJava, what is difference between RxJavaPlugins.setErrorHandler and Subscribe 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());