trap potential panics
This commit is contained in:
parent
3a5e6ae51c
commit
c381a8d179
10
doGui.go
10
doGui.go
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue