You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
service/rpc/error.go

25 lines
594 B

2 years ago
package rpc
type Error uint
const (
ErrorSystem Error = 11001 // 系统错误
ErrorOrderRepeat Error = 11002 // 重复下单
ErrorOrderFreightFee Error = 11003 // 运费获取失败
ErrorOrderSubmit Error = 11004 // 下单失败
ErrorOrderShipment Error = 11005 // 无法配送
)
var ErrorCodes = map[Error]string{
ErrorSystem: "系统错误",
ErrorOrderRepeat: "重复下单",
ErrorOrderFreightFee: "运费获取失败",
ErrorOrderSubmit: "下单失败",
ErrorOrderShipment: "无法配送",
}
func (e Error) Error() string {
return ErrorCodes[e]
}