forwardToErrorPage() — spring-boot Function Reference
Architecture documentation for the forwardToErrorPage() function in ErrorPageFilter.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 10af0bcd_29ba_dea0_6cfd_cda73295502e["forwardToErrorPage()"] 81fd733a_b0d8_277d_a02d_2e68ece549e6["handleException()"] 81fd733a_b0d8_277d_a02d_2e68ece549e6 -->|calls| 10af0bcd_29ba_dea0_6cfd_cda73295502e fbdcf27b_8fbe_5d4a_4f27_ecfe4ec96d00["getDescription()"] 10af0bcd_29ba_dea0_6cfd_cda73295502e -->|calls| fbdcf27b_8fbe_5d4a_4f27_ecfe4ec96d00 3df99bcd_fb9b_da51_1ea0_e130a9a915b0["getMessage()"] 10af0bcd_29ba_dea0_6cfd_cda73295502e -->|calls| 3df99bcd_fb9b_da51_1ea0_e130a9a915b0 f3f2e662_4caf_1d24_2e95_bd9da70f84f2["setErrorAttributes()"] 10af0bcd_29ba_dea0_6cfd_cda73295502e -->|calls| f3f2e662_4caf_1d24_2e95_bd9da70f84f2 style 10af0bcd_29ba_dea0_6cfd_cda73295502e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java lines 178–193
private void forwardToErrorPage(String path, HttpServletRequest request, HttpServletResponse response, Throwable ex)
throws ServletException, IOException {
if (logger.isErrorEnabled()) {
String message = "Forwarding to error page from request " + getDescription(request) + " due to exception ["
+ ex.getMessage() + "]";
logger.error(message, ex);
}
setErrorAttributes(request, 500, ex.getMessage());
request.setAttribute(ERROR_EXCEPTION, ex);
request.setAttribute(ERROR_EXCEPTION_TYPE, ex.getClass());
response.reset();
response.setStatus(500);
request.getRequestDispatcher(path).forward(request, response);
request.removeAttribute(ERROR_EXCEPTION);
request.removeAttribute(ERROR_EXCEPTION_TYPE);
}
Domain
Subdomains
Calls
- getDescription()
- getMessage()
- setErrorAttributes()
Called By
Source
Frequently Asked Questions
What does forwardToErrorPage() do?
forwardToErrorPage() is a function in the spring-boot codebase.
What does forwardToErrorPage() call?
forwardToErrorPage() calls 3 function(s): getDescription, getMessage, setErrorAttributes.
What calls forwardToErrorPage()?
forwardToErrorPage() is called by 1 function(s): handleException.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free