summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-13 22:01:10 +0300
committerAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-07-13 22:01:10 +0300
commitac79d420579efabb93e4decd587d7186964abc52 (patch)
treed2e372e039036b41e2564058aadde47fca692ec1 /app
parenta4e4a6d0bf67c9630a10d5f7412b602f44641079 (diff)
Поправил панику при ошибке
Diffstat (limited to 'app')
-rw-r--r--app/app.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/app.go b/app/app.go
index 1ea0ee8..405a4e9 100644
--- a/app/app.go
+++ b/app/app.go
@@ -3,6 +3,7 @@ package app
import (
"bytes"
"context"
+ "log/slog"
"os"
"text/template"
"time"
@@ -44,7 +45,7 @@ func (a *App) Run(ctx context.Context) error {
return nil
case <-ticker.C:
if err := a.iteration(); err != nil {
- return err
+ slog.ErrorContext(ctx, "failed iteration", slog.Any("error", err))
}
}
}