Skip to content

Commit

Permalink
doNotSwallowError correction
Browse files Browse the repository at this point in the history
  • Loading branch information
amitshekhariitbhu committed Feb 1, 2017
1 parent 4661599 commit a70cd42
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static final class SimpleANObservable<T> extends Observable<T> {
@Override
protected void subscribeActual(Observer<? super T> observer) {
observer.onSubscribe(new ANDisposable(this.call));
boolean dontSwallowError = false;
boolean doNotSwallowError = false;
Response okHttpResponse = null;
try {
final long startTime = System.currentTimeMillis();
Expand Down Expand Up @@ -219,7 +219,7 @@ protected void subscribeActual(Observer<? super T> observer) {
observer.onNext(response.getResult());
}
if (!call.isCanceled()) {
dontSwallowError = true;
doNotSwallowError = true;
observer.onComplete();
}
}
Expand All @@ -230,7 +230,7 @@ protected void subscribeActual(Observer<? super T> observer) {
}
} catch (Exception e) {
Exceptions.throwIfFatal(e);
if (dontSwallowError) {
if (doNotSwallowError) {
RxJavaPlugins.onError(e);
} else if (!call.isCanceled()) {
try {
Expand Down Expand Up @@ -259,7 +259,7 @@ static final class DownloadANObservable<T> extends Observable<T> {
@Override
protected void subscribeActual(Observer<? super T> observer) {
observer.onSubscribe(new ANDisposable(this.call));
boolean dontSwallowError = false;
boolean doNotSwallowError = false;
Response okHttpResponse;
try {
final long startTime = System.currentTimeMillis();
Expand Down Expand Up @@ -293,7 +293,7 @@ protected void subscribeActual(Observer<? super T> observer) {
observer.onNext(response.getResult());
}
if (!call.isCanceled()) {
dontSwallowError = true;
doNotSwallowError = true;
observer.onComplete();
}
}
Expand All @@ -311,7 +311,7 @@ protected void subscribeActual(Observer<? super T> observer) {
}
} catch (Exception e) {
Exceptions.throwIfFatal(e);
if (dontSwallowError) {
if (doNotSwallowError) {
RxJavaPlugins.onError(e);
} else if (!call.isCanceled()) {
try {
Expand Down

0 comments on commit a70cd42

Please sign in to comment.