提交 5dc5e669 编写于 作者: O obscuren

set backtrace during runtime

上级 d651ff96
......@@ -36,6 +36,18 @@ func (js *jsre) adminBindings() {
admin.Set("export", js.exportChain)
admin.Set("dumpBlock", js.dumpBlock)
admin.Set("verbosity", js.verbosity)
admin.Set("backtrace", js.backtrace)
}
func (js *jsre) backtrace(call otto.FunctionCall) otto.Value {
tracestr, err := call.Argument(0).ToString()
if err != nil {
fmt.Println(err)
return otto.UndefinedValue()
}
glog.GetTraceLocation().Set(tracestr)
return otto.UndefinedValue()
}
func (js *jsre) verbosity(call otto.FunctionCall) otto.Value {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册