No warn logging for propagated original exception

Issue: SPR-14907
(cherry picked from commit 96bfc14)
This commit is contained in:
Juergen Hoeller
2016-11-22 16:00:23 +01:00
parent b53ee13662
commit f22a4a4e80

View File

@@ -382,9 +382,12 @@ public class ExceptionHandlerExceptionResolver extends AbstractHandlerMethodExce
}
}
catch (Throwable invocationEx) {
if (logger.isWarnEnabled()) {
// Any other than the original exception is unintended here,
// probably an accident (e.g. failed assertion or the like).
if (invocationEx != exception && logger.isWarnEnabled()) {
logger.warn("Failed to invoke @ExceptionHandler method: " + exceptionHandlerMethod, invocationEx);
}
// Continue with default processing of the original exception...
return null;
}