trap potential panics

This commit is contained in:
Jeff Carr 2025-09-04 18:57:31 -05:00
parent 3a5e6ae51c
commit c381a8d179
1 changed files with 10 additions and 0 deletions

View File

@ -20,6 +20,11 @@ import (
)
func debug() {
defer func() {
if r := recover(); r != nil {
gui.Crash(r, "forge debug()")
}
}()
time.Sleep(2 * time.Second)
for {
now := time.Now()
@ -64,6 +69,11 @@ func debug() {
me.reposWinB.SetLabel(tmp)
}
// check for new patches
if err := me.forge.GetPatches(); err != nil {
log.Info("Get Patchsets Failed", err)
}
log.Printf("finished a forge scan here in (%s)\n", shell.FormatDuration(time.Since(now)))
time.Sleep(90 * time.Second)
}