1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

better error handling

This commit is contained in:
Jesse Duffield
2020-03-28 11:47:54 +11:00
parent 7876cddf4a
commit 814ee24c8d
21 changed files with 108 additions and 173 deletions

View File

@@ -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())
}