summaryrefslogtreecommitdiffstats
path: root/pkg/gui/confirmation_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-03-28 11:47:54 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-03-28 11:59:45 +1100
commit814ee24c8d13ae554925530ec68f325394ddfe6d (patch)
treed4713ad9927e84ad043b640165d132fcc6113dca /pkg/gui/confirmation_panel.go
parent7876cddf4a8390e9d22631e9be036c75b05f418c (diff)
better error handling
Diffstat (limited to 'pkg/gui/confirmation_panel.go')
-rw-r--r--pkg/gui/confirmation_panel.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/gui/confirmation_panel.go b/pkg/gui/confirmation_panel.go
index 112f4769a..0e0a3ac63 100644
--- a/pkg/gui/confirmation_panel.go
+++ b/pkg/gui/confirmation_panel.go
@@ -182,6 +182,10 @@ func (gui *Gui) createSpecificErrorPanel(message string, nextView *gocui.View, w
return gui.createConfirmationPanel(gui.g, nextView, true, gui.Tr.SLocalize("Error"), coloredMessage, nil, nil)
}
-func (gui *Gui) createErrorPanel(g *gocui.Gui, message string) error {
- return gui.createSpecificErrorPanel(message, g.CurrentView(), true)
+func (gui *Gui) createErrorPanel(message string) error {
+ return gui.createSpecificErrorPanel(message, gui.g.CurrentView(), true)
+}
+
+func (gui *Gui) surfaceError(err error) error {
+ return gui.createErrorPanel(err.Error())
}