From c45c0d9f00e56abf51155e984675d7d12500ecfe Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 31 May 2022 01:10:45 +0000 Subject: Call args fix in tests and better error message --- pkg/lang/vm/errors.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/lang/vm/errors.go') diff --git a/pkg/lang/vm/errors.go b/pkg/lang/vm/errors.go index 640ab21..4781179 100644 --- a/pkg/lang/vm/errors.go +++ b/pkg/lang/vm/errors.go @@ -92,11 +92,11 @@ func (e ErrArrayIndexOutOfBounds) Error() string { return fmt.Sprintf("array index out of bounds: %d (len: %d)", e.Index, e.Len) } -type ErrNotEnoughArguments struct { +type ErrWrongNumberOfArguments struct { Needed uint Got uint } -func (e ErrNotEnoughArguments) Error() string { - return fmt.Sprintf("not enough arguments: needed %d, got %d", e.Needed, e.Got) +func (e ErrWrongNumberOfArguments) Error() string { + return fmt.Sprintf("wrong number of arguments: needed %d, got %d", e.Needed, e.Got) } -- cgit 1.4.1