diff --git a/interp/interp.go b/interp/interp.go index c0d4b21b..4ae48705 100644 --- a/interp/interp.go +++ b/interp/interp.go @@ -208,7 +208,7 @@ type Panic struct { } // TODO: Capture interpreter stack frames also and remove -// fmt.Println(n.cfgErrorf("panic")) in runCfg. +// fmt.Fprintln(n.interp.stderr, oNode.cfgErrorf("panic")) in runCfg. func (e Panic) Error() string { return fmt.Sprint(e.Value) } diff --git a/interp/run.go b/interp/run.go index f3ad19c5..48d3cb04 100644 --- a/interp/run.go +++ b/interp/run.go @@ -180,7 +180,7 @@ func runCfg(n *node, f *frame) { if oNode == nil { oNode = n } - fmt.Println(oNode.cfgErrorf("panic")) + fmt.Fprintln(n.interp.stderr, oNode.cfgErrorf("panic")) f.mutex.Unlock() panic(f.recovered) }