Groovy Documentation

org.codehaus.groovy.grails.web.errors
[Java] 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:
org.springframework.web.context.ServletContextAware, GrailsApplicationAware

public class GrailsExceptionResolver
extends org.springframework.web.servlet.handler.SimpleMappingExceptionResolver

Wraps any runtime exceptions with a GrailsWrappedException instance.

Authors:
Graeme Rocher


Field Summary
 
Fields inherited from class org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
DEFAULT_EXCEPTION_ATTRIBUTE, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Fields inherited from class org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Method Summary
static int extractLineNumber(CompilationFailedException e)

static java.lang.RuntimeException getFirstRuntimeException(java.lang.Throwable e)

java.lang.String getRequestLogMessage(javax.servlet.http.HttpServletRequest request)

static java.lang.Throwable getRootCause(java.lang.Throwable ex)

Obtains the root cause of the given exception

org.springframework.web.servlet.ModelAndView resolveException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler, java.lang.Exception ex)

void setGrailsApplication(GrailsApplication grailsApplication)

void setServletContext(javax.servlet.ServletContext servletContext)

 
Methods inherited from class org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#setExceptionMappings(java.util.Properties), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#setDefaultErrorView(java.lang.String), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#setStatusCodes(java.util.Properties), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#setDefaultStatusCode(int), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#setExceptionAttribute(java.lang.String), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#setOrder(int), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#getOrder(), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#setMappedHandlers(java.util.Set), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#setMappedHandlerClasses([Ljava.lang.Class;), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#setWarnLogCategory(java.lang.String), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#setPreventResponseCaching(boolean), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#resolveException(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, java.lang.Exception), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#wait(), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#wait(long), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#wait(long, int), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#equals(java.lang.Object), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#toString(), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#hashCode(), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#getClass(), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#notify(), org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#notifyAll()
 
Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#setOrder(int), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#getOrder(), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#setMappedHandlers(java.util.Set), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#setMappedHandlerClasses([Ljava.lang.Class;), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#setWarnLogCategory(java.lang.String), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#setPreventResponseCaching(boolean), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#resolveException(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, java.lang.Exception), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#wait(), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#wait(long), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#wait(long, int), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#equals(java.lang.Object), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#toString(), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#hashCode(), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#getClass(), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#notify(), org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver#notifyAll()
 

Method Detail

extractLineNumber

public static int extractLineNumber(CompilationFailedException e)


getFirstRuntimeException

public static java.lang.RuntimeException getFirstRuntimeException(java.lang.Throwable e)


getRequestLogMessage

public java.lang.String getRequestLogMessage(javax.servlet.http.HttpServletRequest request)


getRootCause

public static java.lang.Throwable getRootCause(java.lang.Throwable ex)
Obtains the root cause of the given exception
Parameters:
ex - The exception
Returns:
The root cause


resolveException

@Override
public org.springframework.web.servlet.ModelAndView resolveException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler, java.lang.Exception ex)


setGrailsApplication

public void setGrailsApplication(GrailsApplication grailsApplication)


setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)


 

Groovy Documentation