Package: org.codehaus.groovy

## [Java] Class GroovyException

- org.codehaus.groovy.GroovyException

- All Implemented Interfaces and Traits:
    GroovyExceptionInterface

      public class GroovyException
      extends Exception
      implements GroovyExceptionInterface

  Base exception class for Groovy compiler errors and warnings. Implements GroovyExceptionInterface to track exception severity.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `GroovyException()` Constructs a `GroovyException` with no detail message or cause.
    `GroovyException(String message)` Constructs a `GroovyException` with the specified detail message.
    `GroovyException(String message, Throwable cause)` Constructs a `GroovyException` with the specified detail message and cause.
    `GroovyException(boolean fatal)` Constructs a `GroovyException` with the specified fatality flag.
    `GroovyException(String message, boolean fatal)` Constructs a `GroovyException` with the specified detail message and fatality flag.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `isFatal()` Returns whether this exception is fatal. A fatal exception typically causes compilation to stop. Returns: `true` if this exception is fatal; `false` otherwise
    `` | `public void` | `setFatal(boolean fatal)` Sets whether this exception is fatal. A fatal exception typically causes compilation to stop. Parameters: `fatal` - `true` to mark this exception as fatal; `false` otherwise

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Exception` | `addSuppressed, equals, fillInStackTrace, getCause, getClass, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, hashCode, initCause, notify, notifyAll, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public GroovyException()

      Constructs a `GroovyException` with no detail message or cause.

    - #### public GroovyException(String message)

      Constructs a `GroovyException` with the specified detail message.

      Parameters:
        `message` - the detail message describing this exception

    - #### public GroovyException(String message, Throwable cause)

      Constructs a `GroovyException` with the specified detail message and cause.

      Parameters:
        `message` - the detail message describing this exception
        `cause` - the underlying cause of this exception

    - #### public GroovyException(boolean fatal)

      Constructs a `GroovyException` with the specified fatality flag.

      Parameters:
        `fatal` - `true` if this exception should halt compilation; `false` otherwise

    - #### public GroovyException(String message, boolean fatal)

      Constructs a `GroovyException` with the specified detail message and fatality flag.

      Parameters:
        `message` - the detail message describing this exception
        `fatal` - `true` if this exception should halt compilation; `false` otherwise

  - ### Method Detail

    - #### public boolean isFatal()

      Returns whether this exception is fatal. A fatal exception typically causes compilation to stop.

      Returns:
        `true` if this exception is fatal; `false` otherwise

    - #### public void setFatal(boolean fatal)

      Sets whether this exception is fatal. A fatal exception typically causes compilation to stop.

      Parameters:
        `fatal` - `true` to mark this exception as fatal; `false` otherwise