This commit is contained in:
withchao 2023-01-12 17:37:25 +08:00
parent 44e6a5570e
commit a657fd8d51

View File

@ -23,6 +23,14 @@ func (e *ErrInfo) Code() int32 {
return e.ErrCode
}
func (e *ErrInfo) Msg(msg string) *ErrInfo {
return &ErrInfo{
ErrCode: e.ErrCode,
ErrMsg: msg,
DetailErrMsg: e.DetailErrMsg,
}
}
func (e *ErrInfo) Warp() error {
return errors.WithStack(e)
}