@ -1,5 +1,5 @@
/ *
/ *
* Copyright 2002 - 2024 the original author or authors .
* Copyright 2002 - 2025 the original author or authors .
*
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
* you may not use this file except in compliance with the License .
@ -34,6 +34,7 @@ import org.springframework.lang.Nullable;
import org.springframework.util.Assert ;
import org.springframework.util.Assert ;
import org.springframework.web.context.request.RequestAttributes ;
import org.springframework.web.context.request.RequestAttributes ;
import org.springframework.web.context.request.async.DeferredResult.DeferredResultHandler ;
import org.springframework.web.context.request.async.DeferredResult.DeferredResultHandler ;
import org.springframework.web.util.DisconnectedClientHelper ;
/ * *
/ * *
* The central class for managing asynchronous request processing , mainly intended
* The central class for managing asynchronous request processing , mainly intended
@ -350,6 +351,10 @@ public final class WebAsyncManager {
if ( logger . isDebugEnabled ( ) ) {
if ( logger . isDebugEnabled ( ) ) {
logger . debug ( "Servlet container error notification for " + formatUri ( this . asyncWebRequest ) + ": " + ex ) ;
logger . debug ( "Servlet container error notification for " + formatUri ( this . asyncWebRequest ) + ": " + ex ) ;
}
}
if ( DisconnectedClientHelper . isClientDisconnectedException ( ex ) ) {
ex = new AsyncRequestNotUsableException (
"Servlet container error notification for disconnected client" , ex ) ;
}
Object result = interceptorChain . triggerAfterError ( this . asyncWebRequest , callable , ex ) ;
Object result = interceptorChain . triggerAfterError ( this . asyncWebRequest , callable , ex ) ;
result = ( result ! = CallableProcessingInterceptor . RESULT_NONE ? result : ex ) ;
result = ( result ! = CallableProcessingInterceptor . RESULT_NONE ? result : ex ) ;
setConcurrentResultAndDispatch ( result ) ;
setConcurrentResultAndDispatch ( result ) ;
@ -442,6 +447,10 @@ public final class WebAsyncManager {
if ( logger . isDebugEnabled ( ) ) {
if ( logger . isDebugEnabled ( ) ) {
logger . debug ( "Servlet container error notification for " + formatUri ( this . asyncWebRequest ) ) ;
logger . debug ( "Servlet container error notification for " + formatUri ( this . asyncWebRequest ) ) ;
}
}
if ( DisconnectedClientHelper . isClientDisconnectedException ( ex ) ) {
ex = new AsyncRequestNotUsableException (
"Servlet container error notification for disconnected client" , ex ) ;
}
try {
try {
interceptorChain . triggerAfterError ( this . asyncWebRequest , deferredResult , ex ) ;
interceptorChain . triggerAfterError ( this . asyncWebRequest , deferredResult , ex ) ;
synchronized ( WebAsyncManager . this ) {
synchronized ( WebAsyncManager . this ) {