Merge remote-tracking branch 'origin/errcode' into errcode

This commit is contained in:
skiffer-git
2023-01-12 17:31:13 +08:00
4 changed files with 7 additions and 7 deletions
+3 -4
View File
@@ -2,11 +2,10 @@ package constant
import (
sdkws "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
"encoding/json"
"errors"
"fmt"
"github.com/pkg/errors"
"gorm.io/gorm"
)
@@ -25,11 +24,11 @@ func (e *ErrInfo) Code() int32 {
}
func (e *ErrInfo) Warp() error {
return utils.Wrap(e, "")
return errors.WithStack(e)
}
func (e *ErrInfo) WarpMessage(msg string) error {
return utils.Wrap(e, msg)
return errors.WithMessage(e, "")
}
func NewErrNetwork(err error) error {