Finish the logger maintain things.

This commit is contained in:
zicla
2018-11-30 22:01:31 +08:00
parent 84703a8971
commit 1bdfb4996e
8 changed files with 138 additions and 15 deletions

View File

@ -59,6 +59,9 @@ func (this *Router) GlobalPanicHandler(writer http.ResponseWriter, request *http
} else if value, ok := err.(*WebResult); ok {
//一个WebResult对象
webResult = value
} else if value, ok := err.(*CodeWrapper); ok {
//一个WebResult对象
webResult = ConstWebResult(value)
} else if value, ok := err.(error); ok {
//一个普通的错误对象
webResult = CustomWebResult(CODE_WRAPPER_UNKNOWN, value.Error())