chore: more error handling

This commit is contained in:
2026-05-30 12:27:08 +02:00
parent aedd9fce44
commit 07c8d7ea3d
7 changed files with 68 additions and 26 deletions
+10 -3
View File
@@ -17,7 +17,6 @@ func main() {
if err != nil {
slog.Error("Failed to get storage path", "error", err)
os.Exit(1)
return
}
port := "1323"
@@ -25,8 +24,16 @@ func main() {
// and since its the last action in the main go func all other goroutines (e.g. the webserver) are killed
go web.StartWebServer(port)
browser.Browser.Init()
pkg.OpenStartScreen()
err = browser.Browser.Init()
if err != nil {
slog.Error("Initialize browser", "error", err)
os.Exit(1)
}
err = pkg.OpenStartScreen()
if err != nil {
slog.Error("Open start screen", "error", err)
os.Exit(1)
}
defer browser.Browser.Cancel()
<-browser.Browser.Ctx.Done()
}