diff options
Diffstat (limited to 'pkg/lang/vm/errors.go')
| -rw-r--r-- | pkg/lang/vm/errors.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/lang/vm/errors.go b/pkg/lang/vm/errors.go index 5423070..640ab21 100644 --- a/pkg/lang/vm/errors.go +++ b/pkg/lang/vm/errors.go @@ -91,3 +91,12 @@ type ErrArrayIndexOutOfBounds struct { func (e ErrArrayIndexOutOfBounds) Error() string { return fmt.Sprintf("array index out of bounds: %d (len: %d)", e.Index, e.Len) } + +type ErrNotEnoughArguments struct { + Needed uint + Got uint +} + +func (e ErrNotEnoughArguments) Error() string { + return fmt.Sprintf("not enough arguments: needed %d, got %d", e.Needed, e.Got) +} |
