about summary refs log tree commit diff
path: root/pkg/lang/vm/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/lang/vm/errors.go')
-rw-r--r--pkg/lang/vm/errors.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/lang/vm/errors.go b/pkg/lang/vm/errors.go
index 37f3542..264dd3a 100644
--- a/pkg/lang/vm/errors.go
+++ b/pkg/lang/vm/errors.go
@@ -42,6 +42,15 @@ func (e ErrLocalIndexOutOfBounds) Error() string {
 	return fmt.Sprintf("local index out of bounds: %d (len: %d)", e.Index, e.Len)
 }
 
+type ErrStackIndexOutOfBounds struct {
+	Index int
+	Len   int
+}
+
+func (e ErrStackIndexOutOfBounds) Error() string {
+	return fmt.Sprintf("stack index out of bounds: %d (len: %d)", e.Index, e.Len)
+}
+
 type ErrInvalidOp struct {
 	Op uint8
 }