1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-04 10:10:20 +00:00

update middleware & beego's error

This commit is contained in:
astaxie
2013-09-11 17:00:39 +08:00
parent 0da2059f79
commit 9f6b803a10
4 changed files with 33 additions and 299 deletions

View File

@ -1,6 +1,7 @@
package beego
import (
"github.com/astaxie/beego/middleware"
"github.com/astaxie/beego/session"
"net/http"
"path"
@ -25,7 +26,7 @@ func AutoRouter(c ControllerInterface) *App {
}
func Errorhandler(err string, h http.HandlerFunc) *App {
ErrorMaps[err] = h
middleware.Errorhandler(err, h)
return BeeApp
}
@ -78,6 +79,10 @@ func Run() {
}
}
}
registerErrorHander()
middleware.VERSION = VERSION
middleware.AppName = AppName
middleware.RegisterErrorHander()
BeeApp.Run()
}