servletExceptionWithNoCause() — spring-boot Function Reference
Architecture documentation for the servletExceptionWithNoCause() function in ErrorPageFilterTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD dcd98649_8993_75cc_a0a5_d24288a4797a["servletExceptionWithNoCause()"] ceb50e39_12a3_53c8_45a3_31278bc19af6["ErrorPage()"] dcd98649_8993_75cc_a0a5_d24288a4797a -->|calls| ceb50e39_12a3_53c8_45a3_31278bc19af6 b3fa6802_0fcb_6ddf_3e94_a5f8ad2cf83a["TestFilterChain()"] dcd98649_8993_75cc_a0a5_d24288a4797a -->|calls| b3fa6802_0fcb_6ddf_3e94_a5f8ad2cf83a 822a5bf1_1210_1d34_4d64_7b2af9ebd5f5["doFilter()"] dcd98649_8993_75cc_a0a5_d24288a4797a -->|calls| 822a5bf1_1210_1d34_4d64_7b2af9ebd5f5 b31ddfb9_cf30_450c_456a_1eb75ca296e5["getChainResponse()"] dcd98649_8993_75cc_a0a5_d24288a4797a -->|calls| b31ddfb9_cf30_450c_456a_1eb75ca296e5 7606f772_1e74_2d47_7ffb_917e96483136["getStatus()"] dcd98649_8993_75cc_a0a5_d24288a4797a -->|calls| 7606f772_1e74_2d47_7ffb_917e96483136 f5a5d09b_242f_266b_ae47_7aada2f86902["getAttributesForDispatch()"] dcd98649_8993_75cc_a0a5_d24288a4797a -->|calls| f5a5d09b_242f_266b_ae47_7aada2f86902 style dcd98649_8993_75cc_a0a5_d24288a4797a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterTests.java lines 388–410
@Test
void servletExceptionWithNoCause() throws Exception {
this.filter.addErrorPages(new ErrorPage(MissingServletRequestParameterException.class, "/500"));
this.chain = new TestFilterChain((request, response, chain) -> {
chain.call();
throw new MissingServletRequestParameterException("test", "string");
});
this.filter.doFilter(this.request, this.response, this.chain);
assertThat((getChainResponse()).getStatus()).isEqualTo(500);
assertThat(this.request.getAttribute(RequestDispatcher.ERROR_STATUS_CODE)).isEqualTo(500);
assertThat(this.request.getAttribute(RequestDispatcher.ERROR_MESSAGE))
.isEqualTo("Required request parameter 'test' for method parameter type string is not present");
Map<String, Object> requestAttributes = getAttributesForDispatch("/500");
assertThat(requestAttributes).containsEntry(RequestDispatcher.ERROR_EXCEPTION_TYPE,
MissingServletRequestParameterException.class);
assertThat(requestAttributes.get(RequestDispatcher.ERROR_EXCEPTION))
.isInstanceOf(MissingServletRequestParameterException.class);
assertThat(this.request.getAttribute(RequestDispatcher.ERROR_EXCEPTION_TYPE)).isNull();
assertThat(this.request.getAttribute(RequestDispatcher.ERROR_EXCEPTION)).isNull();
assertThat(this.request.getAttribute(RequestDispatcher.ERROR_REQUEST_URI)).isEqualTo("/test/path");
assertThat(this.response.isCommitted()).isTrue();
assertThat(this.response.getForwardedUrl()).isEqualTo("/500");
}
Domain
Subdomains
Source
Frequently Asked Questions
What does servletExceptionWithNoCause() do?
servletExceptionWithNoCause() is a function in the spring-boot codebase.
What does servletExceptionWithNoCause() call?
servletExceptionWithNoCause() calls 6 function(s): ErrorPage, TestFilterChain, doFilter, getAttributesForDispatch, getChainResponse, getStatus.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free