Skip to content

Commit 96bfc14

Browse files
committed
No warn logging for propagated original exception
Issue: SPR-14907
1 parent 9bf4d7c commit 96bfc14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,12 @@ protected ModelAndView doResolveHandlerMethodException(HttpServletRequest reques
381381
}
382382
}
383383
catch (Throwable invocationEx) {
384-
if (logger.isWarnEnabled()) {
384+
// Any other than the original exception is unintended here,
385+
// probably an accident (e.g. failed assertion or the like).
386+
if (invocationEx != exception && logger.isWarnEnabled()) {
385387
logger.warn("Failed to invoke @ExceptionHandler method: " + exceptionHandlerMethod, invocationEx);
386388
}
389+
// Continue with default processing of the original exception...
387390
return null;
388391
}
389392

0 commit comments

Comments
 (0)