Package groovy.lang
Class ClosureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
groovy.lang.ClosureException
- All Implemented Interfaces:
Serializable
An exception thrown by a closure invocation
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionClosureException(Closure closure, Throwable cause) Creates a new closure exception. -
Method Summary
Modifier and TypeMethodDescriptionReturns the closure that threw the exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ClosureException
Creates a new closure exception.- Parameters:
closure- the closure that failedcause- the underlying cause
-
-
Method Details
-
getClosure
Returns the closure that threw the exception.- Returns:
- the failing closure
-