Improve exception handling in startCallableProcessing

Absorb any exception from the submission to the executor. It will be
handled in the resulting ASYNC dispatch.

Closes gh-30232
This commit is contained in:
rstoyanchev
2023-10-03 19:01:13 +01:00
parent a3636affa2
commit ef8d1db403
2 changed files with 26 additions and 7 deletions

View File

@@ -22,7 +22,6 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionException;
import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.logging.Log;
@@ -344,10 +343,9 @@ public final class WebAsyncManager {
});
interceptorChain.setTaskFuture(future);
}
catch (RejectedExecutionException ex) {
catch (Throwable ex) {
Object result = interceptorChain.applyPostProcess(this.asyncWebRequest, callable, ex);
setConcurrentResultAndDispatch(result);
throw ex;
}
}