This commit is contained in:
withchao
2023-01-13 18:29:25 +08:00
parent 176c65ebaf
commit 50d6b4053a
2 changed files with 40 additions and 34 deletions
+8
View File
@@ -16,6 +16,14 @@ type ErrInfo struct {
DetailErrMsg string
}
func NewErrInfo(code int32, msg, detail string) *ErrInfo {
return &ErrInfo{
ErrCode: code,
ErrMsg: msg,
DetailErrMsg: detail,
}
}
func (e *ErrInfo) Error() string {
return "errMsg: " + e.ErrMsg + " detail errMsg: " + e.DetailErrMsg
}