RxJavaPlugins always invoked printStackTrace

Created on 23 Jan 2018  Â·  6Comments  Â·  Source: ReactiveX/RxJava

io.reactivex.plugins.RxJavaPlugins#onError how to resolve this issue?

image

Most helpful comment

What you mean baby? @pli2014

All 6 comments

errorHandler could catch all exception and return immediately. f.accept(error); return;

why do you design this? log system... @benjchristensen

What you mean baby? @pli2014

@teaey I found this topic: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling

When we integrated this RxJava in our product, we need to implement these handler with io.reactivex.plugins.RxJavaPlugins

RxJavaPlugins always invoked printStackTrace

Not always, only when there is no error handler or that handler crashes. The purpose is to get at least some indication that there was an error.

why do you design this?

v1 swallowed errors and you had no idea your program was failing all the time. This way, there is a chance you can log the excess errors. Also see the wiki.

log system...

Which log system? There are so many. Besides, by registering a handler, you can call into the log system of your choosing.

benjchristensen

The v2 design is by me.

@pli2014 稳

Was this page helpful?
0 / 5 - 0 ratings