/** * This method uses the newee API and gets passed the handler-method * (typically the method on the <tt>@Controller</tt>) that generated the * exception. */ @Override protected ModelAndView doResolveHandlerMethodException( HttpServletRequest request, HttpServletResponse response, HandlerMethod handlerMethod, Exception exception) { // Get the ModelAndView to use ModelAndView mav = super.doResolveHandlerMethodException(request, response, handlerMethod, exception); // Make more information available to the view mav.addObject("exception", exception); mav.addObject("url", request.getRequestURL()); mav.addObject("timestamp", new Date()); mav.addObject("status", 500); return mav; } }
/** * This method uses the newee API and gets passed the handler-method * (typically the method on the <tt>@Controller</tt>) that generated the * exception. */ @Override protected ModelAndView doResolveHandlerMethodException( HttpServletRequest request, HttpServletResponse response, HandlerMethod handlerMethod, Exception exception) { // Get the ModelAndView to use ModelAndView mav = super.doResolveHandlerMethodException(request, response, handlerMethod, exception); // Make more information available to the view mav.addObject("exception", exception); mav.addObject("url", request.getRequestURL()); mav.addObject("timestamp", new Date()); mav.addObject("status", 500); return mav; } }