Skip to content

Commit 3fd76bb

Browse files
committed
Dump the stack on exceptions in eval
1 parent 9dc3e65 commit 3fd76bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vm/eval.go

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"errors"
66
"fmt"
77
"github.com/ncw/gpython/py"
8+
"runtime/debug"
89
)
910

1011
// Stack operations
@@ -976,6 +977,8 @@ func Run(globals, locals py.StringDict, code *py.Code) (res py.Object, err error
976977
err = errors.New(fmt.Sprintf("Unknown error '%s'", x))
977978
}
978979
}
980+
// Dump the goroutine stack
981+
debug.PrintStack()
979982
}()
980983
vm.PushFrame(globals, locals, code)
981984

0 commit comments

Comments
 (0)