Package org.springframework.web.servlet
Interface HandlerExceptionResolver
- All Known Implementing Classes:
- AbstractHandlerExceptionResolver,- AbstractHandlerMethodExceptionResolver,- DefaultHandlerExceptionResolver,- ExceptionHandlerExceptionResolver,- HandlerExceptionResolverComposite,- ResponseStatusExceptionResolver,- SimpleMappingExceptionResolver
public interface HandlerExceptionResolver
Interface to be implemented by objects that can resolve exceptions thrown during
 handler mapping or execution, in the typical case to error views. Implementors are
 typically registered as beans in the application context.
 
Error views are analogous to JSP error pages but can be used with any kind of exception including any checked exception, with potentially fine-grained mappings for specific handlers.
- Since:
- 22.11.2003
- Author:
- Juergen Hoeller
- 
Method SummaryModifier and TypeMethodDescriptionresolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) Try to resolve the given exception that got thrown during handler execution, returning aModelAndViewthat represents a specific error page if appropriate.
- 
Method Details- 
resolveException@Nullable ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, @Nullable Object handler, Exception ex) Try to resolve the given exception that got thrown during handler execution, returning aModelAndViewthat represents a specific error page if appropriate.The returned ModelAndViewmay be empty to indicate that the exception has been resolved successfully but that no view should be rendered, for instance by setting a status code.- Parameters:
- request- current HTTP request
- response- current HTTP response
- handler- the executed handler, or- nullif none chosen at the time of the exception (for example, if multipart resolution failed)
- ex- the exception that got thrown during handler execution
- Returns:
- a corresponding ModelAndViewto forward to, ornullfor default processing in the resolution chain
 
 
-