-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Description
When an exception occurred in onCompleted() the exception is not propagate to onError().
Code of rx.operators.SafeObserver
@Override
public void onCompleted() {
if (isFinished.compareAndSet(false, true)) {
try {
actual.onCompleted();
} catch (Throwable e) {
// handle errors if the onCompleted implementation fails, not just if the Observable fails
onError(e);
}
// auto-unsubscribe
subscription.unsubscribe();
}
}
In our case isFinished is already TRUE, so onError does nothing.
@Override
public void onError(Throwable e) {
if (isFinished.compareAndSet(false, true)) {
...
}
}
Metadata
Metadata
Assignees
Labels
No labels