yanzhenjie/NoHttp

不回调success,Debug发现报 java.util.concurrent.CancellationException

csh159 opened this issue · 0 comments

@OverRide
protected void done() {
try {
Response response = get(); 这句话报异常
if (response.isSucceed()) {
mCallback.onSucceed(mWhat, response);
} else {
mCallback.onFailed(mWhat, response);
}
} catch (CancellationException e) {
if (!isStart) {
isStart = true;
mCallback.onStart(mWhat);
}
.....
再往里走 是下面方法抛出异常
@SuppressWarnings("unchecked")
private V report(int s) throws ExecutionException {
Object x = outcome;
if (s == NORMAL)
return (V)x;
if (s >= CANCELLED) //测试s=6
throw new CancellationException();
throw new ExecutionException((Throwable)x);
}