Groovy Documentation

## org.codehaus.groovy.grails.web.errors
[Java] Class GrailsExceptionResolver

    java.lang.Object
      org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
          org.codehaus.groovy.grails.web.errors.GrailsExceptionResolver

All Implemented Interfaces:
  ServletContextAware

    public class GrailsExceptionResolver
    extends SimpleMappingExceptionResolver

Wraps any runtime exceptions with a GrailsWrappedException instance.

Authors:
  Graeme Rocher

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

Method Detail

### extractLineNumber

    public static int extractLineNumber(CompilationFailedException e)

### getFirstRuntimeException

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

### getRequestLogMessage

    public static java.lang.String getRequestLogMessage(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 ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, java.lang.Object handler, java.lang.Exception ex)

### setServletContext

    public void setServletContext(ServletContext servletContext)

Groovy Documentation