Replace fatals with returns
This commit is contained in:
parent
44cc4e00f2
commit
b95c00a12d
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue