You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// special handling for certain Throwable/Error/Exception types
8532
8532
Exceptions.throwIfFatal(e);
8533
-
// if an unhandled error occurs executing the onSubscribe we will propagate it
8534
-
try {
8535
-
subscriber.onError(hook.onSubscribeError(e));
8536
-
} catch (Throwable e2) {
8537
-
Exceptions.throwIfFatal(e2);
8538
-
// if this happens it means the onError itself failed (perhaps an invalid function implementation)
8539
-
// so we are unable to propagate the error correctly and will just throw
8540
-
RuntimeException r = new RuntimeException("Error occurred attempting to subscribe [" + e.getMessage() + "] and then again while trying to pass to onError.", e2);
8541
-
// TODO could the hook be the cause of the error in the on error handling.
8542
-
hook.onSubscribeError(r);
8543
-
// TODO why aren't we throwing the hook's return value.
8544
-
throw r;
8533
+
// in case the subscriber can't listen to exceptions anymore
// if an unhandled error occurs executing the onSubscribe we will propagate it
8538
+
try {
8539
+
subscriber.onError(hook.onSubscribeError(e));
8540
+
} catch (Throwable e2) {
8541
+
Exceptions.throwIfFatal(e2);
8542
+
// if this happens it means the onError itself failed (perhaps an invalid function implementation)
8543
+
// so we are unable to propagate the error correctly and will just throw
8544
+
RuntimeException r = new OnErrorFailedException("Error occurred attempting to subscribe [" + e.getMessage() + "] and then again while trying to pass to onError.", e2);
8545
+
// TODO could the hook be the cause of the error in the on error handling.
8546
+
hook.onSubscribeError(r);
8547
+
// TODO why aren't we throwing the hook's return value.
0 commit comments