Files
moxa/_test/panic0.go
Denys Smirnov f5b5481794 interp: Record function names in panic
Currently, yaegi only records source positions when writing panic trace to stderr.

This change adds function names to the panic output.

Unfortunately, yaegi walks the trace in reverse order, comparing to Go runtime. This can be improved in the future.
2023-09-23 12:24:05 +02:00

21 lines
135 B
Go

package main
func main() {
foo()
}
func foo() {
bar()
}
func bar() {
baz()
}
func baz() {
panic("stop!")
}
// Error:
// stop!