Skip to content

Commit

Permalink
2.x: CompositeException fix order of Exceptions (#4695)
Browse files Browse the repository at this point in the history
* 2.x: CompositeException fix order of Exceptions

* Take out Completable classes
  • Loading branch information
vanniktech authored and akarnokd committed Oct 12, 2016
1 parent 63a5931 commit 35c2951
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void onError(Throwable t) {
p = nextSupplier.apply(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
actual.onError(new CompositeException(e, t));
actual.onError(new CompositeException(t, e));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void onError(Throwable t) {
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
state.lazySet(HAS_REQUEST_HAS_VALUE);
actual.onError(new CompositeException(e, t));
actual.onError(new CompositeException(t, e));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void onError(Throwable t) {
b = predicate.test(++retries, t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
actual.onError(new CompositeException(e, t));
actual.onError(new CompositeException(t, e));
return;
}
if (!b) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void onError(Throwable t) {
b = predicate.test(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
actual.onError(new CompositeException(e, t));
actual.onError(new CompositeException(t, e));
return;
}
if (!b) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void subscribeActual(Subscriber<? super T> s) {
disposer.accept(resource);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
EmptySubscription.error(new CompositeException(ex, e), s);
EmptySubscription.error(new CompositeException(e, ex), s);
return;
}
EmptySubscription.error(e, s);
Expand Down Expand Up @@ -119,7 +119,7 @@ public void onError(Throwable t) {

s.cancel();
if (innerError != null) {
actual.onError(new CompositeException(innerError, t));
actual.onError(new CompositeException(t, innerError));
} else {
actual.onError(t);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void onError(Throwable t) {
predicate.test(null); // special case: poison pill
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
actual.onError(new CompositeException(e, t));
actual.onError(new CompositeException(t, e));
return;
}
actual.onError(t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void onError(Throwable t) {
p = nextSupplier.apply(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
actual.onError(new CompositeException(e, t));
actual.onError(new CompositeException(t, e));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void onError(Throwable t) {
v = valueSupplier.apply(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
actual.onError(new CompositeException(e, t));
actual.onError(new CompositeException(t, e));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void onError(Throwable t) {
b = predicate.test(++retries, t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
actual.onError(new CompositeException(e, t));
actual.onError(new CompositeException(t, e));
return;
}
if (!b) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void onError(Throwable t) {
b = predicate.test(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
actual.onError(new CompositeException(e, t));
actual.onError(new CompositeException(t, e));
return;
}
if (!b) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void subscribeActual(Observer<? super T> s) {
disposer.accept(resource);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
EmptyDisposable.error(new CompositeException(ex, e), s);
EmptyDisposable.error(new CompositeException(e, ex), s);
return;
}
EmptyDisposable.error(e, s);
Expand Down Expand Up @@ -111,7 +111,7 @@ public void onError(Throwable t) {
disposer.accept(resource);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
t = new CompositeException(e, t);
t = new CompositeException(t, e);
}
}

Expand Down

0 comments on commit 35c2951

Please sign in to comment.