Class CompilationFailedException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MultipleCompilationErrorsException

public class CompilationFailedException extends GroovyRuntimeException
Thrown when compilation fails from source errors.
See Also:
  • Field Details

    • phase

      protected int phase
      Compilation phase in which the failure occurred.
    • unit

      protected ProcessingUnit unit
      Processing unit that reported the failure.
  • Constructor Details

    • CompilationFailedException

      public CompilationFailedException(int phase, ProcessingUnit unit, Throwable cause)
      Creates a compilation failure with an underlying cause.
      Parameters:
      phase - the phase in which the failure occurred
      unit - the processing unit that failed
      cause - the underlying cause
    • CompilationFailedException

      public CompilationFailedException(int phase, ProcessingUnit unit)
      Creates a compilation failure without an underlying cause.
      Parameters:
      phase - the phase in which the failure occurred
      unit - the processing unit that failed
  • Method Details

    • getUnit

      public ProcessingUnit getUnit()
      Returns the ProcessingUnit in which the error occurred.