diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-28 11:47:54 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-28 11:59:45 +1100 |
commit | 814ee24c8d13ae554925530ec68f325394ddfe6d (patch) | |
tree | d4713ad9927e84ad043b640165d132fcc6113dca /pkg/gui/updates.go | |
parent | 7876cddf4a8390e9d22631e9be036c75b05f418c (diff) |
better error handling
Diffstat (limited to 'pkg/gui/updates.go')
-rw-r--r-- | pkg/gui/updates.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/updates.go b/pkg/gui/updates.go index 32280b117..b44c5d5e4 100644 --- a/pkg/gui/updates.go +++ b/pkg/gui/updates.go @@ -14,10 +14,10 @@ func (gui *Gui) showUpdatePrompt(newVersion string) error { func (gui *Gui) onUserUpdateCheckFinish(newVersion string, err error) error { if err != nil { - return gui.createErrorPanel(gui.g, err.Error()) + return gui.surfaceError(err) } if newVersion == "" { - return gui.createErrorPanel(gui.g, "New version not found") + return gui.createErrorPanel("New version not found") } return gui.showUpdatePrompt(newVersion) } @@ -49,7 +49,7 @@ func (gui *Gui) onUpdateFinish(err error) error { gui.statusManager.removeStatus("updating") gui.renderString(gui.g, "appStatus", "") if err != nil { - return gui.createErrorPanel(gui.g, "Update failed: "+err.Error()) + return gui.createErrorPanel("Update failed: " + err.Error()) } return nil } |