This commit is contained in:
withchao 2023-01-12 17:30:48 +08:00
parent 0f4170907f
commit 231e0adea1

View File

@ -2,11 +2,10 @@ package constant
import ( import (
sdkws "Open_IM/pkg/proto/sdk_ws" sdkws "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context" "context"
"encoding/json" "encoding/json"
"errors"
"fmt" "fmt"
"github.com/pkg/errors"
"gorm.io/gorm" "gorm.io/gorm"
) )
@ -25,11 +24,11 @@ func (e *ErrInfo) Code() int32 {
} }
func (e *ErrInfo) Warp() error { func (e *ErrInfo) Warp() error {
return utils.Wrap(e, "") return errors.WithStack(e)
} }
func (e *ErrInfo) WarpMessage(msg string) error { func (e *ErrInfo) WarpMessage(msg string) error {
return utils.Wrap(e, msg) return errors.WithMessage(e, "")
} }
func NewErrNetwork(err error) error { func NewErrNetwork(err error) error {