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

panic if parse failed

This commit is contained in:
Pengfei Xue
2013-12-04 23:53:36 +08:00
parent fb6312a303
commit 420e816bed
2 changed files with 37 additions and 9 deletions

View File

@ -67,13 +67,12 @@ func InsertFilter(pattern string, pos int, filter FilterFunc) *App {
}
func Run() {
//if AppConfigPath not In the conf/app.conf reParse config
// 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)
}
// configuration is critical to app, panic here if parse failed
panic(err)
}
}