org.codehaus.groovy.grails.web.errors
Class GrailsExceptionResolver
java.lang.Object
org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
org.codehaus.groovy.grails.web.errors.GrailsExceptionResolver
- All Implemented Interfaces:
- Ordered, ServletContextAware, HandlerExceptionResolver
public class GrailsExceptionResolver
- extends SimpleMappingExceptionResolver
- implements ServletContextAware
Exception resolver that wraps any runtime exceptions with a GrailsWrappedException instance
- Since:
- 22 Dec, 2005
- Author:
- Graeme Rocher
Methods inherited from class org.springframework.web.servlet.handler.SimpleMappingExceptionResolver |
applyStatusCodeIfPossible, determineStatusCode, determineViewName, doResolveException, findMatchingViewName, getDepth, getModelAndView, getModelAndView, setDefaultErrorView, setDefaultStatusCode, setExceptionAttribute, setExceptionMappings, setStatusCodes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GrailsExceptionResolver
public GrailsExceptionResolver()
resolveException
public ModelAndView resolveException(HttpServletRequest request,
HttpServletResponse response,
Object handler,
Exception ex)
- Specified by:
resolveException
in interface HandlerExceptionResolver
- Overrides:
resolveException
in class AbstractHandlerExceptionResolver
getRootCause
public static Throwable getRootCause(Throwable ex)
- Obtains the root cause of the given exception
- Parameters:
ex
- The exception
- Returns:
- The root cause
setServletContext
public void setServletContext(ServletContext servletContext)
- Specified by:
setServletContext
in interface ServletContextAware
extractLineNumber
public static int extractLineNumber(org.codehaus.groovy.control.CompilationFailedException e)
getFirstRuntimeException
public static RuntimeException getFirstRuntimeException(Throwable e)
Copyright (c) 2005-2009 The Grails project