Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我开始使用 rxJava 进行开发,我有以下情况:
我有一个 observable,我想让一个订阅者处理错误onError,而另一个订阅者处理retryWhen.
onError
retryWhen
重试时吞下错误,如何避免吞下错误?
你可以像这样放在doOnError/doOnEach前面retryWhen:
doOnError/doOnEach
o.doOnError(t -> { // do something }).retryWhen(o -> { // do something });