better error log

pull/19/head
QLeelulu 8 years ago
parent 4c16678129
commit 50e34eeff7

@ -21,23 +21,23 @@ func Init() (err error) {
// init id creator
if err = initID(); err != nil {
return fmt.Errorf("Init UUID Generator faild: %s", err)
return fmt.Errorf("Init UUID Generator failed: %s", err)
}
// init config
if err = conf.Init(); err != nil {
return fmt.Errorf("Init Config faild: %s", err)
return fmt.Errorf("Init Config failed: %s", err)
}
// init etcd client
if DefalutClient, err = NewClient(conf.Config); err != nil {
return fmt.Errorf("Connect to ETCD %s faild: %s",
return fmt.Errorf("Connect to ETCD %s failed: %s",
conf.Config.Etcd.Endpoints, err)
}
// init mongoDB
if mgoDB, err = db.NewMdb(conf.Config.Mgo); err != nil {
return fmt.Errorf("Connect to MongoDB %s faild: %s",
return fmt.Errorf("Connect to MongoDB %s failed: %s",
conf.Config.Mgo.Hosts, err)
}

Loading…
Cancel
Save