Skip to content

Commit

Permalink
slightly better error log message when scanning battles directory fails
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasf committed Apr 7, 2024
1 parent c29d004 commit 42820dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ func main() {
fsc := scanner.FSScanner{Fsys: rootFsys}
battles, err := scanner.GetAllBattles(fsc.GetBattleNames, fsc.GetBattle)
if err != nil {
panic(err)
slog.Error("error reading battles from directory", "dir", flags.Dir, "err", err)
os.Exit(1)
}
for _, b := range battles {
if err := db.UpdateBattle(b); err != nil {
Expand Down

0 comments on commit 42820dd

Please sign in to comment.