Replace fatals with returns

This commit is contained in:
マリウス 2020-10-11 21:14:22 +01:00
parent 44cc4e00f2
commit b95c00a12d
No known key found for this signature in database
GPG key ID: C228EF0A530AF06F

View file

@ -1,7 +1,7 @@
package z package z
import ( import (
"log" "errors"
"time" "time"
) )
@ -30,7 +30,6 @@ func NewEntry(
} else { } else {
beginTime, err = ParseTime(begin) beginTime, err = ParseTime(begin)
if err != nil { if err != nil {
log.Fatalln("Could not parse begin time!")
return Entry{}, err return Entry{}, err
} }
} }
@ -38,7 +37,6 @@ func NewEntry(
if finish != "" { if finish != "" {
finishTime, err = ParseTime(finish) finishTime, err = ParseTime(finish)
if err != nil { if err != nil {
log.Fatalln("Could not parse finish time!")
return Entry{}, err return Entry{}, err
} }
} }