org.springframework.web.servlet

Interface HandlerExceptionResolver

    • Method Detail

      • resolveException

        @Nullable
        ModelAndView resolveException(HttpServletRequest request,
                                                HttpServletResponse response,
                                                @Nullable
                                                java.lang.Object handler,
                                                java.lang.Exception ex)
        Try to resolve the given exception that got thrown during handler execution, returning a ModelAndView that represents a specific error page if appropriate.

        The returned 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.

        Parameters:
        request - current HTTP request
        response - current HTTP response
        handler - the executed handler, or null if 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 ModelAndView to forward to, or null for default processing in the resolution chain