-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
能支持序列化和反序列化么 #1
Comments
Hi, 序列化的结果应该是和 |
我跨进程调用需要这个啊, 我需要它像本地错误一样处理,特别是 多个 error 和 堆栈, 还有 errors.Is() 和 errors.As() 的支持 |
你这个项目相对 pkg/errors 之类的没有本质的改进, 无非是有后发优势, API 定义更合理。 你实现我上面的需求才能获得更多关注。 |
这里主要是优化了堆栈的多次生成, 加入了错误码的支持, 自定义堆栈深度, 打印格式等特性.
不知道我的理解是否有问题, 另外如果能给我一些代码case理解这个诉求就更好了😊 |
这个 MyError 涉及到很多麻烦的地方
pkg/errors 能出名是因为发明了 errors.Is() 和 errors.As() 这也是标库接受 errors.Wrap(), errors.Is() 和 errors.Is() , 却不接受errors.WithStack()堆栈的原因 当然 errors.WithStack() 还是有一些用处的, 当我 panic(err) 时这个 err 最好是 errors.WithStack() 过的 |
这里确实有很多待定的问题, 尤其是Join后产生的实际是一棵错误树, 对于一棵错误树来讲,堆栈就更复杂了. |
@mei-rune ok, 我来看一下他的实现, 可能需要一些时间. |
最近有没有动作啊 |
No description provided.
The text was updated successfully, but these errors were encountered: