customererror
This commit is contained in:
parent
a649050155
commit
af1fe8d3bc
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user