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

panic if parse config failed

This commit is contained in:
Pengfei Xue
2013-12-03 19:26:51 +08:00
parent ec745693dc
commit 12ade02f2d
2 changed files with 26 additions and 20 deletions

View File

@ -1,11 +1,12 @@
package beego
import (
"github.com/astaxie/beego/middleware"
"github.com/astaxie/beego/session"
"net/http"
"path"
"strings"
"github.com/astaxie/beego/middleware"
"github.com/astaxie/beego/session"
)
const VERSION = "0.9.9"
@ -61,21 +62,12 @@ func AddFilter(pattern, action string, filter FilterFunc) *App {
}
func InsertFilter(pattern string, pos int, filter FilterFunc) *App {
BeeApp.InsertFilter(pattern, pos, filter)
return BeeApp
BeeApp.InsertFilter(pattern, pos, filter)
return BeeApp
}
func Run() {
//if AppConfigPath not In the conf/app.conf reParse config
if AppConfigPath != path.Join(AppPath, "conf", "app.conf") {
err := ParseConfig()
if err != nil {
if RunMode == "dev" {
Warn(err)
}
}
}
InitConfig()
if SessionOn {
GlobalSessions, _ = session.NewManager(SessionProvider,