fix error ers

This commit is contained in:
daniel.w 2024-11-13 14:58:30 +08:00
parent 720178fe0d
commit 31098996a6
1 changed files with 2 additions and 2 deletions

View File

@ -25,13 +25,13 @@ func ThirdPartyErrorL(scope uint32, ec ErrorCode,
return e
}
func DatabaseErrorWithScope(scope uint32, ec ErrorCode, s ...string) *ers.LibError {
func DatabaseErrorWithScope(scope uint32, ec ErrorCode, s ...string) *LibError {
return NewError(scope, code.DBError, ec.ToUint32(), strings.Join(s, " "))
}
func DatabaseErrorWithScopeL(scope uint32,
ec ErrorCode,
l logx.Logger, filed []logx.LogField, s ...string) *ers.LibError {
l logx.Logger, filed []logx.LogField, s ...string) *LibError {
e := DatabaseErrorWithScope(scope, ec, s...)
l.WithCallerSkip(1).WithFields(filed...).Error(e.Error())