subClassExceptionError() — spring-boot Function Reference
Architecture documentation for the subClassExceptionError() function in ErrorPageFilterTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 065bd499_013f_3863_b667_ce165e3dd1d0["subClassExceptionError()"] ceb50e39_12a3_53c8_45a3_31278bc19af6["ErrorPage()"] 065bd499_013f_3863_b667_ce165e3dd1d0 -->|calls| ceb50e39_12a3_53c8_45a3_31278bc19af6 b3fa6802_0fcb_6ddf_3e94_a5f8ad2cf83a["TestFilterChain()"] 065bd499_013f_3863_b667_ce165e3dd1d0 -->|calls| b3fa6802_0fcb_6ddf_3e94_a5f8ad2cf83a 822a5bf1_1210_1d34_4d64_7b2af9ebd5f5["doFilter()"] 065bd499_013f_3863_b667_ce165e3dd1d0 -->|calls| 822a5bf1_1210_1d34_4d64_7b2af9ebd5f5 b31ddfb9_cf30_450c_456a_1eb75ca296e5["getChainResponse()"] 065bd499_013f_3863_b667_ce165e3dd1d0 -->|calls| b31ddfb9_cf30_450c_456a_1eb75ca296e5 7606f772_1e74_2d47_7ffb_917e96483136["getStatus()"] 065bd499_013f_3863_b667_ce165e3dd1d0 -->|calls| 7606f772_1e74_2d47_7ffb_917e96483136 f5a5d09b_242f_266b_ae47_7aada2f86902["getAttributesForDispatch()"] 065bd499_013f_3863_b667_ce165e3dd1d0 -->|calls| f5a5d09b_242f_266b_ae47_7aada2f86902 style 065bd499_013f_3863_b667_ce165e3dd1d0 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 238–257
@Test
void subClassExceptionError() throws Exception {
this.filter.addErrorPages(new ErrorPage(RuntimeException.class, "/500"));
this.chain = new TestFilterChain((request, response, chain) -> {
chain.call();
throw new IllegalStateException("BAD");
});
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("BAD");
Map<String, Object> requestAttributes = getAttributesForDispatch("/500");
assertThat(requestAttributes).containsEntry(RequestDispatcher.ERROR_EXCEPTION_TYPE,
IllegalStateException.class);
assertThat(requestAttributes.get(RequestDispatcher.ERROR_EXCEPTION)).isInstanceOf(IllegalStateException.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();
}
Domain
Subdomains
Source
Frequently Asked Questions
What does subClassExceptionError() do?
subClassExceptionError() is a function in the spring-boot codebase.
What does subClassExceptionError() call?
subClassExceptionError() 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