about summary refs log tree commit diff
path: root/pkg/lang/vm/errors.go
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-05-31 01:10:45 +0000
committerGitHub <noreply@github.com>2022-05-31 01:10:45 +0000
commitc45c0d9f00e56abf51155e984675d7d12500ecfe (patch)
treef0d8e76feac3b3197a20706c2c9050143016ab0a /pkg/lang/vm/errors.go
parent338744d066704e48e22d8ec56a43acb4b20da7f1 (diff)
downloadjinx-c45c0d9f00e56abf51155e984675d7d12500ecfe.tar.zst
jinx-c45c0d9f00e56abf51155e984675d7d12500ecfe.zip
Call args fix in tests and better error message
Diffstat (limited to 'pkg/lang/vm/errors.go')
-rw-r--r--pkg/lang/vm/errors.go6
1 files changed, 3 insertions, 3 deletions
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)
 }