diff options
Diffstat (limited to 'vendor/github.com/d5/tengo/v2/vm.go')
-rw-r--r-- | vendor/github.com/d5/tengo/v2/vm.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/d5/tengo/v2/vm.go b/vendor/github.com/d5/tengo/v2/vm.go index 783a54a9..af8783f0 100644 --- a/vendor/github.com/d5/tengo/v2/vm.go +++ b/vendor/github.com/d5/tengo/v2/vm.go @@ -80,14 +80,14 @@ func (v *VM) Run() (err error) { if err != nil { filePos := v.fileSet.Position( v.curFrame.fn.SourcePos(v.ip - 1)) - err = fmt.Errorf("Runtime Error: %s\n\tat %s", - err.Error(), filePos) + err = fmt.Errorf("Runtime Error: %w\n\tat %s", + err, filePos) for v.framesIndex > 1 { v.framesIndex-- v.curFrame = &v.frames[v.framesIndex-1] filePos = v.fileSet.Position( v.curFrame.fn.SourcePos(v.curFrame.ip - 1)) - err = fmt.Errorf("%s\n\tat %s", err.Error(), filePos) + err = fmt.Errorf("%w\n\tat %s", err, filePos) } return err } |