提交 34eb99f4 编写于 作者: J Jesse Wilson 提交者: GitHub

Merge pull request #1986 from square/jw/throw-fatal

Propagate fatal exceptions even if already dispatching an error.
......@@ -19,6 +19,7 @@ import retrofit2.Response;
import rx.Observable.OnSubscribe;
import rx.Subscriber;
import rx.exceptions.CompositeException;
import rx.exceptions.Exceptions;
import rx.plugins.RxJavaPlugins;
final class BodyOnSubscribe<T> implements OnSubscribe<T> {
......@@ -51,6 +52,7 @@ final class BodyOnSubscribe<T> implements OnSubscribe<T> {
try {
subscriber.onError(t);
} catch (Throwable inner) {
Exceptions.throwIfFatal(inner);
CompositeException composite = new CompositeException(t, inner);
RxJavaPlugins.getInstance().getErrorHandler().handleError(composite);
}
......
......@@ -82,6 +82,7 @@ final class CallOnSubscribe<T> implements OnSubscribe<Response<T>> {
try {
subscriber.onError(t);
} catch (Throwable inner) {
Exceptions.throwIfFatal(inner);
CompositeException composite = new CompositeException(t, inner);
RxJavaPlugins.getInstance().getErrorHandler().handleError(composite);
}
......
......@@ -19,6 +19,7 @@ import retrofit2.Response;
import rx.Observable.OnSubscribe;
import rx.Subscriber;
import rx.exceptions.CompositeException;
import rx.exceptions.Exceptions;
import rx.plugins.RxJavaPlugins;
final class ResultOnSubscribe<T> implements OnSubscribe<Result<T>> {
......@@ -51,6 +52,7 @@ final class ResultOnSubscribe<T> implements OnSubscribe<Result<T>> {
try {
subscriber.onError(t);
} catch (Throwable inner) {
Exceptions.throwIfFatal(inner);
CompositeException composite = new CompositeException(t, inner);
RxJavaPlugins.getInstance().getErrorHandler().handleError(composite);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册