TooFewPositionalArgumentException class
Thrown when a runtime invocation receives fewer positional arguments than the target function or constructor requires.
This error is raised before invocation occurs, during argument-shape validation, and typically represents incorrect caller behavior or a failed binding/resolution process.
Example:
void g(int a, int b, int c) {}
// Expected 3 positional args but got 1
resolver.invoke(g, [7]);
- Inheritance
-
- Object
- Error
- RuntimeException
- RuntimeResolverException
- ArgumentResolutionException
- TooFewPositionalArgumentException
- Available extensions
Constructors
- TooFewPositionalArgumentException(int expected, int actual, {required String location})
- Thrown when a runtime invocation receives fewer positional arguments than the target function or constructor requires.
Properties
- actual → int
-
The number of positional arguments actually supplied by the caller.
final
- cause → Object?
-
The underlying cause of this exception, if any.
finalinherited
- expected → int
-
The number of required positional arguments expected by the target.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- location → String
-
The logical or physical location where the argument resolution failed.
finalinherited
- message → String
-
The message describing the error.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace
-
The associated stack trace.
finalinherited
Methods
-
getCause(
) → Object -
The cause of this exception, if any.
inherited
-
getMessage(
) → String -
The message associated with this exception.
inherited
-
getStackTrace(
) → StackTrace -
The stack trace associated with this exception.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
printStackTrace(
[bool useErrorPrint = false]) → void -
Available on Error, provided by the ErrorExtensions extension
Prints the error along with its stack trace. -
printStackTrace(
[StackTrace? stacktrace, bool useErrorPrint = false]) → void -
Available on Exception, provided by the ExceptionExtensions extension
Prints the exception and optional StackTrace if available. -
printStackTrace(
[bool useErrorPrint = false]) → void -
Available on RuntimeException, provided by the RuntimeExceptionExtensions extension
Extension on RuntimeException to support pretty stack trace printing. -
printStackTrace(
[bool useErrorPrint = false]) → void -
Available on Throwable, provided by the ThrowableExtensions extension
Extension on Throwable to support printing stack traces in a unified way. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited