Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary

Fields inherited from class org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
`DEFAULT_EXCEPTION_ATTRIBUTE`

Fields inherited from class org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
`logger`

Fields inherited from interface org.springframework.core.Ordered
`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

Constructor Summary
`GrailsExceptionResolver()`

Method Summary
`static int` | `extractLineNumber(org.codehaus.groovy.control.CompilationFailedException e)`
`static RuntimeException` | `getFirstRuntimeException(Throwable e)`
`static Throwable` | `getRootCause(Throwable ex)` Obtains the root cause of the given exception
`ModelAndView` | `resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)`
`void` | `setServletContext(ServletContext servletContext)`

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 org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
`buildLogMessage, getOrder, logException, setMappedHandlerClasses, setMappedHandlers, setOrder, setWarnLogCategory, shouldApplyTo`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GrailsExceptionResolver

    public GrailsExceptionResolver()

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2005-2009 The Grails project