No warn logging for propagated original exception

Issue: SPR-14907
This commit is contained in:
Juergen Hoeller 2016-11-22 16:00:23 +01:00
parent 9bf4d7cf4e
commit 96bfc14dba
1 changed files with 4 additions and 1 deletions

View File

@ -381,9 +381,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;
}