Package groovy.lang
Class IncorrectClosureArgumentsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
groovy.lang.GroovyRuntimeException
groovy.lang.IncorrectClosureArgumentsException
- All Implemented Interfaces:
Serializable
An exception occurred when invoking a Closure with the wrong number and/or
types of arguments
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIncorrectClosureArgumentsException(Closure closure, Object arguments, Class[] expected) Creates an exception describing mismatched closure arguments. -
Method Summary
Modifier and TypeMethodDescriptionReturns the supplied arguments.Returns the target closure.Class[]Returns the expected parameter types.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
-
Constructor Details
-
IncorrectClosureArgumentsException
Creates an exception describing mismatched closure arguments.- Parameters:
closure- the target closurearguments- the supplied argumentsexpected- the expected parameter types
-
-
Method Details
-
getArguments
Returns the supplied arguments.- Returns:
- the supplied arguments
-
getClosure
Returns the target closure.- Returns:
- the target closure
-
getExpected
Returns the expected parameter types.- Returns:
- the expected parameter types
-