use println instead of panic

This commit is contained in:
siddontang 2014-07-02 10:13:10 +08:00
parent b5400e8056
commit 4b37a88a9d
1 changed files with 6 additions and 3 deletions

View File

@ -17,18 +17,21 @@ func main() {
flag.Parse() flag.Parse()
if len(*configFile) == 0 { if len(*configFile) == 0 {
panic("must use a config file") println("must use a config file")
return
} }
cfg, err := server.NewConfigWithFile(*configFile) cfg, err := server.NewConfigWithFile(*configFile)
if err != nil { if err != nil {
panic(err) println(err.Error())
return
} }
var app *server.App var app *server.App
app, err = server.NewApp(cfg) app, err = server.NewApp(cfg)
if err != nil { if err != nil {
panic(err) println(err.Error())
return
} }
sc := make(chan os.Signal, 1) sc := make(chan os.Signal, 1)