Skip to content

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

@csh159

Description

@csh159

@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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions