Golang的errors错误系统升级版(原开发者:桓创开发团队-宋子桓)。

SongZihuan 214fef9bb8 fix: 修复若干错误 hace 1 año
sample 6fd0bd0da6 fix: 更新go.mod hace 1 año
.gitignore b192819eb3 feat: 版本1 hace 1 año
LICENSE 97b43834fd feat: 增加许可授权 hace 1 año
README.md d2fc1e2d14 feat: 添加README hace 1 año
baseclass.go 0b23460a39 feat: 第4版 hace 1 año
errorclass.go d524e5e6b5 fix: 修复若干问题 hace 1 año
errors.go 269a3ac8d7 feat: 添加msg接口 hace 1 año
errors_test.go b192819eb3 feat: 版本1 hace 1 año
go.mod 6fd0bd0da6 fix: 更新go.mod hace 1 año
reflect.go b192819eb3 feat: 版本1 hace 1 año
stack.go b192819eb3 feat: 版本1 hace 1 año
utils.go 214fef9bb8 fix: 修复若干错误 hace 1 año

README.md

桓创错误处理包

简介

错误由class派生,具有code,msg,cause,stack属性。

code

表示错误类型,一般由class定义。

msg

具体的错误,.Error().Message返回相同。

cause

上级错误原因。

stack

错误堆栈。

默认的class

默认的class是base,可以使用errors.Errorferrors.New快速创建。

案例

sample目录下