Package: org.grails.web.errors

## [Java] Class GrailsWrappedRuntimeException

- org.grails.web.errors.GrailsWrappedRuntimeException

-     public class GrailsWrappedRuntimeException
      extends GrailsException

  Wraps a Grails RuntimeException and attempts to extract more relevent diagnostic messages from the stack trace.

  Authors:
    Graeme Rocher
  Since:
    0.1

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private static java.util.regex.Pattern` | `ANY_GSP_DETAILS` |
    `private static org.apache.commons.logging.Log` | `LOG` |
    `private static java.util.regex.Pattern` | `PARSE_DETAILS_STEP1` |
    `private static java.util.regex.Pattern` | `PARSE_DETAILS_STEP2` |
    `private static java.util.regex.Pattern` | `PARSE_GSP_DETAILS_STEP1` |
    `private static java.lang.String` | `UNKNOWN` |
    `static java.lang.String` | `URL_PREFIX` |
    `private java.lang.Throwable` | `cause` |
    `private java.lang.String` | `className` |
    `private java.lang.String[]` | `codeSnippet` |
    `private java.lang.String` | `fileName` |
    `private static java.lang.Class<? extends GrailsApplicationAttributes>` | `grailsApplicationAttributesClass` |
    `private static java.lang.reflect.Constructor<? extends GrailsApplicationAttributes>` | `grailsApplicationAttributesConstructor` |
    `private java.lang.String` | `gspFile` |
    `private int` | `lineNumber` |
    `private org.springframework.core.io.support.PathMatchingResourcePatternResolver` | `resolver` |
    `private static long` | `serialVersionUID` |
    `private java.lang.String` | `stackTrace` |
    `private java.lang.String[]` | `stackTraceLines` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class GrailsException` | `serialVersionUID`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsWrappedRuntimeException (javax.servlet.ServletContext servletContext, java.lang.Throwable t)` Parameters: `servletContext` - The ServletContext instance

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `private void` | `checkIfSourceCodeAware(java.lang.Throwable t)`
    `` | `public java.lang.String` | `getClassName()` Returns: Returns the className.
    `` | `public java.lang.String[]` | `getCodeSnippet()` Returns: Returns the line.
    `` | `public int` | `getLineNumber()` Returns: Returns the lineNumber.
    `` | `public java.lang.String` | `getMessage()`
    `` | `public java.lang.String[]` | `getStackTraceLines()` Returns: Returns the stackTrace lines
    `` | `public java.lang.String` | `getStackTraceText()` Returns: Returns the stackTrace.

- - ### Field Detail

    - #### private static final java.util.regex.Pattern ANY_GSP_DETAILS

    - #### private static final org.apache.commons.logging.Log LOG

    - #### private static final java.util.regex.Pattern PARSE_DETAILS_STEP1

    - #### private static final java.util.regex.Pattern PARSE_DETAILS_STEP2

    - #### private static final java.util.regex.Pattern PARSE_GSP_DETAILS_STEP1

    - #### private static final java.lang.String UNKNOWN

    - #### public static final java.lang.String URL_PREFIX

    - #### private java.lang.Throwable cause

    - #### private java.lang.String className

    - #### private java.lang.String[] codeSnippet

    - #### private java.lang.String fileName

    - #### private static final java.lang.Class<? extends GrailsApplicationAttributes> grailsApplicationAttributesClass

    - #### private static final java.lang.reflect.Constructor<? extends GrailsApplicationAttributes> grailsApplicationAttributesConstructor

    - #### private java.lang.String gspFile

    - #### private int lineNumber

    - #### private org.springframework.core.io.support.PathMatchingResourcePatternResolver resolver

    - #### private static final long serialVersionUID

    - #### private java.lang.String stackTrace

    - #### private java.lang.String[] stackTraceLines

  - ### Constructor Detail

    - #### public GrailsWrappedRuntimeException(javax.servlet.ServletContext servletContext, java.lang.Throwable t)

      Parameters:
        `servletContext` - The ServletContext instance
        `t` - The exception that was thrown

  - ### Method Detail

    - #### private void checkIfSourceCodeAware(java.lang.Throwable t)

    - #### public java.lang.String getClassName()

      Returns:
        Returns the className.

    - #### public java.lang.String[] getCodeSnippet()

      Returns:
        Returns the line.

    - #### public int getLineNumber()

      Returns:
        Returns the lineNumber.

    - #### @java.lang.Override public java.lang.String getMessage()

    - #### public java.lang.String[] getStackTraceLines()

      Returns:
        Returns the stackTrace lines

    - #### public java.lang.String getStackTraceText()

      Returns:
        Returns the stackTrace.