@Override
    public ModelAndView resolveException(HttpServletRequest request,
                                         HttpServletResponse response, Object handler, Exception ex) {

        HandlerMethod handlerMethod = (HandlerMethod) handler;
        ExceptionResolver exceptionResolver = handlerMethod
                .getMethodAnnotation(ExceptionResolver.class);
        MapEntry exceptionProcessor = getExceptionProcessor(exceptionResolver,
                ex);

        if (exceptionProcessor == null) {
            return null;
        }

        ServletWebRequest webRequest = new ServletWebRequest(request, response);
        try {
            return getModelAndView(handlerMethod.getMethod(), webRequest,
                    exceptionProcessor, ex);
        } catch (Exception e) {
            logger.error("Invoking request method resulted in exception : "
                    + handlerMethod, e);
        }

        return null;
    }