错误处理
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.

25 lines
337 B

/*
* package error event
* Copyright (c) 2017 R&D.
* By guzeng
* 2018/01/05
*/
package ttlerr
/**
* 定义error
*/
type TTLError struct {
Code string
Msg string
}
func (e TTLError) Error() string {
return e.Code + " | " + e.Msg
}
func NewErr(code string, msg string) *TTLError {
return &TTLError{Code: code, Msg: msg}
}