1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00

stop panicing earlier than needed

This commit is contained in:
Kane York 2016-07-16 15:29:12 -07:00
parent 972437cd4a
commit 9d1b3e926d

View file

@ -83,8 +83,6 @@ func loadHLL(at time.Time, dest *PeriodUniqueUsers) error {
dec := gob.NewDecoder(bytes.NewReader(fileBytes)) dec := gob.NewDecoder(bytes.NewReader(fileBytes))
err = dec.Decode(dest.Counter) err = dec.Decode(dest.Counter)
if err != nil { if err != nil {
log.Panicln(err)
return err return err
} }
return nil return nil
@ -160,6 +158,7 @@ func loadUniqueUsers() {
// file didn't finish writing // file didn't finish writing
// errors in NewPlus are bad precisions // errors in NewPlus are bad precisions
uniqueCounter.Counter, _ = hyperloglog.NewPlus(CounterPrecision) uniqueCounter.Counter, _ = hyperloglog.NewPlus(CounterPrecision)
log.Println("failed to load unique users data:", err)
} else if err != nil { } else if err != nil {
log.Panicln("failed to load unique users data:", err) log.Panicln("failed to load unique users data:", err)
} }