Library verision : 2.1.7
The following code will silently swallow thrown exception without signalling to RxPlugins.
val subject = PublishSubject.create<Unit>()
var disposable: Disposable? = null
disposable = subject.subscribe(
{
disposable?.dispose()
throw Exception("test")
}
)
subject.onNext(Unit)
The same applies to BehaviourSubject, *Processor, but not SingleSubject or Observable.just (.range etc. ). Though sections about error handling are almost equal in PublishSubject and SingleSubject.
The reason seems to be located in LambdaObserver, which doesn't signal onError if is disposed already.
Is it expected behaviour?