Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ public final void onNext(Object data) {
doOnNext(data);
} catch (Throwable t) {
LOGGER.warn(INTERNAL_ERROR, "", "", "Error while doOnNext", t);
onError(t);
Throwable throwable = t;
try {
doOnError(throwable);
} catch (Throwable t1) {
LOGGER.warn(INTERNAL_ERROR, "", "", "Error while doOnError, original error: " + throwable, t1);
throwable = t1;
}
onCompleted(throwable);
}
}

Expand All @@ -105,7 +112,6 @@ public final void onError(Throwable throwable) {
if (closed) {
return;
}

try {
throwable = customizeError(throwable);
if (throwable == null) {
Expand All @@ -122,7 +128,6 @@ public final void onError(Throwable throwable) {
LOGGER.warn(INTERNAL_ERROR, "", "", "Error while doOnError, original error: " + throwable, t);
throwable = t;
}

onCompleted(throwable);
}

Expand Down