1
0
mirror of https://github.com/astaxie/beego.git synced 2025-09-14 09:32:10 +00:00
This commit is contained in:
astaxie
2013-07-07 17:58:50 +08:00
parent 461eac46b9
commit 11977f4f77
3 changed files with 6 additions and 1 deletions

View File

@@ -189,7 +189,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
defer func() {
if err := recover(); err != nil {
errstr := fmt.Sprint(err)
if handler, ok := ErrorMaps[errstr]; ok {
if handler, ok := ErrorMaps[errstr]; ok && ErrorsShow {
handler(rw, r)
} else {
if !RecoverPanic {