Package: org.codehaus.groovy.control

## [Java] Class CompilationFailedException

- org.codehaus.groovy.control.CompilationFailedException

- Thrown when compilation fails from source errors.

  Authors:
    Chris Poirier

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected int` | `phase` |
    `protected ProcessingUnit` | `unit` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CompilationFailedException (int phase, ProcessingUnit unit, Throwable cause)`
    `CompilationFailedException (int phase, ProcessingUnit unit)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `ProcessingUnit` | `getUnit()` Formats the error data as a String.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GroovyRuntimeException` | `getLocationText, getMessage, getMessageWithoutLocationText, getModule, getNode, setModule`
    `class RuntimeException` | `printStackTrace, printStackTrace, printStackTrace, getStackTrace, fillInStackTrace, getCause, initCause, toString, getMessage, getSuppressed, getLocalizedMessage, setStackTrace, addSuppressed, equals, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### protected int phase

    - #### protected ProcessingUnit unit

  - ### Constructor Detail

    - #### public CompilationFailedException(int phase, ProcessingUnit unit, Throwable cause)

    - #### public CompilationFailedException(int phase, ProcessingUnit unit)

  - ### Method Detail

    - #### public ProcessingUnit getUnit()

      Formats the error data as a String.