-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Description
This issue is related to #969, where it has been said that following code should throw exception:
Observable.error(new Exception())
.subscribe(new Observer<Object>() {
public void onCompleted() {
// noop
}
public void onError(Throwable e) {
throw new IllegalStateException("This should crash the app");
}
public void onNext(Object o) {
// noop
}
});
And it does throw exception, but when you add groupBy/flatMap like that:
Observable.error(new Exception())
.groupBy(o -> o)
.flatMap(g -> g)
.subscribe(new Observer<Object>() {
public void onCompleted() {
// noop
}
public void onError(Throwable e) {
throw new IllegalStateException("This should crash the app");
}
public void onNext(Object o) {
// noop
}
});
Then the exception is silently swallowed. I tried to debug it a little bit, and seems that it could be because OnErrorFailedException is wrapped with CompositeException, so Exceptions.throwIfFatal() doesn't recognize it as fatal.
Reactions are currently unavailable