Exceptions thrown from @ExceptionHandler methods logged at warn level (instead of debug)

Issue: SPR-14861
This commit is contained in:
Juergen Hoeller
2016-10-30 21:40:20 +01:00
parent 9ccffb6de5
commit 7627c38695
2 changed files with 19 additions and 23 deletions

View File

@@ -26,7 +26,6 @@ import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.transform.Source;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
@@ -381,9 +380,9 @@ public class ExceptionHandlerExceptionResolver extends AbstractHandlerMethodExce
exceptionHandlerMethod.invokeAndHandle(webRequest, mavContainer, exception, handlerMethod);
}
}
catch (Exception invocationEx) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to invoke @ExceptionHandler method: " + exceptionHandlerMethod, invocationEx);
catch (Throwable invocationEx) {
if (logger.isWarnEnabled()) {
logger.warn("Failed to invoke @ExceptionHandler method: " + exceptionHandlerMethod, invocationEx);
}
return null;
}