close

Filter

loading table of contents...

Content Application Developer Manual / Version 2301

Table Of Contents

4.3.10.2 Uncaught exceptions while executing a handler

The DispatcherServlet will catch any unhandled exception thrown while executing handlers or handler interceptors and delegate them to HandlerExceptionResolvers to map the unhandled exception to a ModelAndView. Spring throws different unchecked exceptions when the DispatcherServlet is unable to resolve a request to a controller or fails to bind the request to it, for example because no matching type converter is defined. The default HandlerExceptionResolver simply maps these exception types to HTTP status codes such as 404 (NOT FOUND) or 400 (BAD REQUEST). A list of the default status code mappings is included in the Spring documentation. For consistent error pages, it is recommended to define a custom exception resolver and map unhandled exceptions to HttpError models to share error views with explicit exception handling.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.