Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
csh159 opened this issue Oct 16, 2019 · 0 comments
Open

Comments

@csh159
Copy link

csh159 commented Oct 16, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant