Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddErrDealer ¶ added in v0.1.3
func AddErrDealer(errDealer ...ErrDealer)
AddErrDealer 添加一个错误处理器
func CheckErr ¶ added in v0.1.3
func CheckErr(err interface{}, w http.ResponseWriter, r *http.Request, isDev bool)
CheckErr check panic err , match err and deal
func WriteErrInfo ¶ added in v0.1.3
func WriteErrInfo(err interface{}, stack []byte, w http.ResponseWriter)
WriteErrInfo 返回错误信息
Types ¶
type Dealer ¶ added in v0.1.3
type Dealer interface {
Deal(err interface{}, w http.ResponseWriter, r *http.Request)
}
Dealer 匹配后的处理
type Matcher ¶ added in v0.1.3
type Matcher interface {
Match(err interface{}) bool
}
Matcher 是否匹配错误
type MehtodNotMatchError ¶ added in v0.2.0
type MehtodNotMatchError struct { RequestError Method string }
MehtodNotMatchError 匹配错误
func (MehtodNotMatchError) Error ¶ added in v0.2.0
func (mnm MehtodNotMatchError) Error() string
Error 实现error
type RequestError ¶ added in v0.2.0
RequestError 请求错误
Click to show internal directories.
Click to hide internal directories.