Package: org.codehaus.groovy.control

## [Java] Class CompilationFailedException

- org.codehaus.groovy.control.CompilationFailedException

- Thrown when compilation fails from source errors.

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

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