public interface HandlerExceptionResolver
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.
|Modifier and Type||Method and Description|
Try to resolve the given exception that got thrown during handler execution, returning a
@Nullable ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, @Nullable Object handler, Exception ex)
ModelAndViewthat represents a specific error page if appropriate.
ModelAndView may 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.
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
ModelAndViewto forward to, or
nullfor default processing in the resolution chain