【发布时间】:2019-04-07 08:54:57
【问题描述】:
我有一个 Flowable<T> 和我想忽略的 IgnoreThisError 子类型的错误(导致正常完成),所有其他错误都应该向下游传播。
Kotlin 示例:
val f : Flowable<T> = ...
val g = f.onErrorComplete { it is IgnoreThisError }
onErrorComplete这个函数是我需要的,不存在的……
【问题讨论】:
-
类似这样的东西:
kotlin f.onErrorComplete { when (it) { is IgnoreThisError -> ... else -> throw it } } -
@NickRyan 这个问题的全部原因是
Flowable没有onErrorComplete。
标签: kotlin rx-java2 rx-kotlin2