code: @Override
      public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response,
                                           Object handler, Exception ex) {
          // don't reuse cached controller attribute 
          request.removeAttribute(GrailsApplicationAttributes.GRAILS_CONTROLLER_CLASS_AVAILABLE);        
          
          ex = findWrappedException(ex);
  
          filterStackTrace(ex);
  
          ModelAndView mv = super.resolveException(request, response, handler, ex);
  
          setStatus(request, response, mv, ex);
  
          logStackTrace(ex, request);
  
          UrlMappingsHolder urlMappings = lookupUrlMappings();
          if (urlMappings != null) {
              mv = resolveViewOrForward(ex, urlMappings, request, response, mv);
          }
  
          return mv;
      }
docs: /* (non-Javadoc)
  @see org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#resolveException(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, java.lang.Exception)