customererror

This commit is contained in:
wh_zcy 2023-06-06 10:35:48 +08:00
parent a649050155
commit af1fe8d3bc

View File

@ -16,7 +16,7 @@ func (e *CustomError) Error() string {
return e.Code.String()
}
func NewCustomError(errdata *pb.ErrorData) error {
func NewCustomError(code pb.ErrorCode) error {
// 初次调用得用Wrap方法进行实例化
return errors.Wrap(&CustomError{
Code: code,