Skip to content

Commit

Permalink
Merge pull request square#1119 from artem-zinnatullin/improve-error-h…
Browse files Browse the repository at this point in the history
…andling-in-rx-call-adapter

Improve error handling in RxJavaCallAdapterFactory
  • Loading branch information
JakeWharton committed Sep 26, 2015
2 parents 7e6bd27 + 187887b commit 72c794f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.lang.reflect.Type;
import rx.Observable;
import rx.Subscriber;
import rx.exceptions.Exceptions;
import rx.functions.Action0;
import rx.functions.Func1;
import rx.subscriptions.Subscriptions;
Expand Down Expand Up @@ -112,6 +113,7 @@ private CallOnSubscribe(Call<T> originalCall) {
subscriber.onNext(response);
}
} catch (Throwable t) {
Exceptions.throwIfFatal(t);
if (!subscriber.isUnsubscribed()) {
subscriber.onError(t);
}
Expand Down

0 comments on commit 72c794f

Please sign in to comment.