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 d19604a..9859feb 100644
--- a/pkg/lang/vm/errors.go
+++ b/pkg/lang/vm/errors.go
@@ -8,6 +8,15 @@ import (
 	"jinx/pkg/lang/vm/value"
 )
 
+type Error struct {
+	Pc  int
+	Err error
+}
+
+func (e Error) Error() string {
+	return fmt.Sprintf("vm error at pc %d: %s", e.Pc, e.Err)
+}
+
 // Fatal errors
 
 var (