Package org.codehaus.groovy.control
Class CompilationFailedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
groovy.lang.GroovyRuntimeException
org.codehaus.groovy.control.CompilationFailedException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MultipleCompilationErrorsException
Thrown when compilation fails from source errors.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intCompilation phase in which the failure occurred.protected ProcessingUnitProcessing unit that reported the failure. -
Constructor Summary
ConstructorsConstructorDescriptionCompilationFailedException(int phase, ProcessingUnit unit) Creates a compilation failure without an underlying cause.CompilationFailedException(int phase, ProcessingUnit unit, Throwable cause) Creates a compilation failure with an underlying cause. -
Method Summary
Modifier and TypeMethodDescriptiongetUnit()Returns the ProcessingUnit in which the error occurred.Methods inherited from class groovy.lang.GroovyRuntimeException
getLocationText, getMessage, getMessageWithoutLocationText, getModule, getNode, setModuleMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
phase
protected int phaseCompilation phase in which the failure occurred. -
unit
Processing unit that reported the failure.
-
-
Constructor Details
-
CompilationFailedException
Creates a compilation failure with an underlying cause.- Parameters:
phase- the phase in which the failure occurredunit- the processing unit that failedcause- the underlying cause
-
CompilationFailedException
Creates a compilation failure without an underlying cause.- Parameters:
phase- the phase in which the failure occurredunit- the processing unit that failed
-
-
Method Details
-
getUnit
Returns the ProcessingUnit in which the error occurred.
-