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