summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pkg/gui/confirmation_panel.go6
-rw-r--r--pkg/gui/gui.go9
2 files changed, 15 insertions, 0 deletions
diff --git a/pkg/gui/confirmation_panel.go b/pkg/gui/confirmation_panel.go
index ed8a0137f..103b6a084 100644
--- a/pkg/gui/confirmation_panel.go
+++ b/pkg/gui/confirmation_panel.go
@@ -244,5 +244,11 @@ func (gui *Gui) createErrorPanel(message string) error {
}
func (gui *Gui) surfaceError(err error) error {
+ for _, sentinelError := range gui.sentinelErrorsArr() {
+ if err == sentinelError {
+ return err
+ }
+ }
+
return gui.createErrorPanel(err.Error())
}
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 12d680ab9..e95ef1e99 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -72,6 +72,15 @@ func (gui *Gui) GenerateSentinelErrors() {
}
}
+func (gui *Gui) sentinelErrorsArr() []error {
+ return []error{
+ gui.Errors.ErrSubProcess,
+ gui.Errors.ErrNoFiles,
+ gui.Errors.ErrSwitchRepo,
+ gui.Errors.ErrRestart,
+ }
+}
+
// Teml is short for template used to make the required map[string]interface{} shorter when using gui.Tr.SLocalize and gui.Tr.TemplateLocalize
type Teml i18n.Teml