Response的onFailure参数修改为HttpException
This commit is contained in:
@ -89,12 +89,9 @@ public class LibaoUtils {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable e) {
|
||||
if (e instanceof HttpException) {
|
||||
HttpException exception = (HttpException) e;
|
||||
if (exception.code() == 401) {
|
||||
getCunHaoXiang(context, false);
|
||||
}
|
||||
public void onFailure(HttpException e) {
|
||||
if (e != null && e.code() == 401) {
|
||||
getCunHaoXiang(context, false);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -117,13 +114,10 @@ public class LibaoUtils {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable e) {
|
||||
if (e instanceof HttpException) {
|
||||
HttpException exception = (HttpException) e;
|
||||
if (exception.code() == 401) {
|
||||
postLibaoLing(context, libaoId, false, listener);
|
||||
return;
|
||||
}
|
||||
public void onFailure(HttpException e) {
|
||||
if (e != null && e.code() == 401) {
|
||||
postLibaoLing(context, libaoId, false, listener);
|
||||
return;
|
||||
}
|
||||
listener.postFailed(e);
|
||||
}
|
||||
@ -147,13 +141,10 @@ public class LibaoUtils {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable e) {
|
||||
if (e instanceof HttpException) {
|
||||
HttpException exception = (HttpException) e;
|
||||
if (exception.code() == 401) {
|
||||
postLibaoLing(context, libaoId, false, listener);
|
||||
return;
|
||||
}
|
||||
public void onFailure(HttpException e) {
|
||||
if (e != null && e.code() == 401) {
|
||||
postLibaoLing(context, libaoId, false, listener);
|
||||
return;
|
||||
}
|
||||
listener.postFailed(e);
|
||||
}
|
||||
@ -177,13 +168,10 @@ public class LibaoUtils {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable e) {
|
||||
if (e instanceof HttpException) {
|
||||
HttpException exception = (HttpException) e;
|
||||
if (exception.code() == 401) {
|
||||
postLibaoLing(context, code, false, listener);
|
||||
return;
|
||||
}
|
||||
public void onFailure(HttpException e) {
|
||||
if (e != null && e.code() == 401) {
|
||||
postLibaoLing(context, code, false, listener);
|
||||
return;
|
||||
}
|
||||
listener.postFailed(e);
|
||||
}
|
||||
@ -201,7 +189,7 @@ public class LibaoUtils {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable e) {
|
||||
public void onFailure(HttpException e) {
|
||||
listener.postFailed(e);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user