*: handle panic and fatal more consistently

1. etcd fatals if there is critical error in the system and operator should
do something for it
2. etcd panics if there happens something unexpected, and it should be
reported to us to debug.
This commit is contained in:
Yicheng Qin
2014-11-05 12:14:42 -08:00
parent c6104c1e2a
commit 791b2fd503
8 changed files with 35 additions and 37 deletions

View File

@@ -49,7 +49,7 @@ func (us *URLsValue) String() string {
func NewURLsValue(init string) *URLsValue {
v := &URLsValue{}
if err := v.Set(init); err != nil {
log.Panicf("error setting URLsValue: %v", err)
log.Panicf("new URLsValue should never fail: %v", err)
}
return v
}