Commit 2d674521 authored by Dave Syer's avatar Dave Syer

Log exceptions in ErrorPageFilter

For some reason I thought that the DispatcherServlet default handler
would log all exceptions, so if we did it in the ErrorPageFilter it
would lead to duplicates. That appears not to be the case.

Fixes gh-1427
parent 607f78a7
...@@ -143,6 +143,7 @@ class ErrorPageFilter extends AbstractConfigurableEmbeddedServletContainer imple ...@@ -143,6 +143,7 @@ class ErrorPageFilter extends AbstractConfigurableEmbeddedServletContainer imple
rethrow(ex); rethrow(ex);
return; return;
} }
logger.error("Forwarding to error page", ex);
setErrorAttributes(request, 500, ex.getMessage()); setErrorAttributes(request, 500, ex.getMessage());
request.setAttribute(ERROR_EXCEPTION, ex); request.setAttribute(ERROR_EXCEPTION, ex);
request.setAttribute(ERROR_EXCEPTION_TYPE, type.getName()); request.setAttribute(ERROR_EXCEPTION_TYPE, type.getName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment