1 Star 4 Fork 11

王布衣 / pandas

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
trace.go 365 Bytes
一键复制 编辑 原始数据 按行查看 历史
package stat
import (
"bytes"
"fmt"
"runtime"
)
// PanicTrace panic 堆栈信息
func PanicTrace(err interface{}) string {
buf := new(bytes.Buffer)
_, _ = fmt.Fprintf(buf, "%v\n", err)
for i := 1; ; i++ {
pc, file, line, ok := runtime.Caller(i)
if !ok {
break
}
_, _ = fmt.Fprintf(buf, "%s:%d (0x%x)\n", file, line, pc)
}
return buf.String()
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/quant1x/pandas.git
git@gitee.com:quant1x/pandas.git
quant1x
pandas
pandas
v1.0.6

搜索帮助

344bd9b3 5694891 D2dac590 5694891