From 231e0adea194905abf551cb125711864a09b90ee Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Thu, 12 Jan 2023 17:30:48 +0800 Subject: [PATCH] 1 --- pkg/common/constant/err_info.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/common/constant/err_info.go b/pkg/common/constant/err_info.go index 7158bdec7..31fb79dec 100644 --- a/pkg/common/constant/err_info.go +++ b/pkg/common/constant/err_info.go @@ -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 {