From 4b37a88a9d019e5817bc8db8021e7ed9b572eecd Mon Sep 17 00:00:00 2001 From: siddontang Date: Wed, 2 Jul 2014 10:13:10 +0800 Subject: [PATCH] use println instead of panic --- cmd/ledis-server/main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/ledis-server/main.go b/cmd/ledis-server/main.go index 8513559..84c4442 100644 --- a/cmd/ledis-server/main.go +++ b/cmd/ledis-server/main.go @@ -17,18 +17,21 @@ func main() { flag.Parse() if len(*configFile) == 0 { - panic("must use a config file") + println("must use a config file") + return } cfg, err := server.NewConfigWithFile(*configFile) if err != nil { - panic(err) + println(err.Error()) + return } var app *server.App app, err = server.NewApp(cfg) if err != nil { - panic(err) + println(err.Error()) + return } sc := make(chan os.Signal, 1)