Skip to content

Commit

Permalink
1.x: onErrorResumeNext(Func1) should not call plugin handler there
Browse files Browse the repository at this point in the history
  • Loading branch information
akarnokd committed Feb 9, 2016
1 parent 182833e commit 0871af0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ public void onCompleted() {
public void onError(Throwable e) {
if (done) {
Exceptions.throwIfFatal(e);
RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
return;
}
done = true;
try {
RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
unsubscribe();
Subscriber<T> next = new Subscriber<T>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ public void onNext(T t) {
public void onError(Throwable e) {
if (done) {
Exceptions.throwIfFatal(e);
RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
return;
}
done = true;
RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
unsubscribe();
resumeSequence.unsafeSubscribe(child);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ public void onNext(T t) {
public void onError(Throwable e) {
if (done) {
Exceptions.throwIfFatal(e);
RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
return;
}
done = true;
try {
RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
unsubscribe();
T result = resultFunction.call(e);
child.onNext(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ public void onNext(T t) {
public void onError(Throwable e) {
if (done) {
Exceptions.throwIfFatal(e);
RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
return;
}
done = true;
if (e instanceof Exception) {
RxJavaPlugins.getInstance().getErrorHandler().handleError(e);
unsubscribe();
resumeSequence.unsafeSubscribe(child);
} else {
Expand Down

0 comments on commit 0871af0

Please sign in to comment.