Skip to content

Commit

Permalink
Update error handling in core/record.go
Browse files Browse the repository at this point in the history
Co-authored-by: Dominik Braun <mail@dominikbraun.io>
  • Loading branch information
joshuaherrera and dominikbraun authored Jun 1, 2021
1 parent 02ad318 commit d593076
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ func (t *Timetrace) LoadLatestRecord() (*Record, error) {

dir, err := t.latestNonEmptyDir(latestDirs)
if err != nil {
if errors.Is(err, ErrAllDirectoriesEmpty) {
return nil, ErrTrackingNotStarted
}
return nil, err
}

Expand Down

0 comments on commit d593076

Please sign in to comment.