diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-04-15 08:25:17 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-04-18 10:10:30 +0200 |
commit | caad55350252793b53aaf699062644a2cddc6a08 (patch) | |
tree | 4b65b46c7d1e32f1d8e90b528545b081b0fd8822 /pkg/gui/popup | |
parent | 723b92916d3b5a19de6c1d1673972dc4b241f5b7 (diff) |
Remove ErrorMsg
There is no reason any more for application code to show error messages in a
panel. Just return an error instead.
Diffstat (limited to 'pkg/gui/popup')
-rw-r--r-- | pkg/gui/popup/popup_handler.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/pkg/gui/popup/popup_handler.go b/pkg/gui/popup/popup_handler.go index f5a6eb8c6..1ca9cc3ee 100644 --- a/pkg/gui/popup/popup_handler.go +++ b/pkg/gui/popup/popup_handler.go @@ -80,12 +80,8 @@ func (self *PopupHandler) WithWaitingStatusSync(message string, f func() error) } func (self *PopupHandler) ErrorHandler(err error) error { - return self.ErrorMsg(err.Error()) -} - -func (self *PopupHandler) ErrorMsg(message string) error { // Need to set bold here explicitly; otherwise it gets cancelled by the red colouring. - coloredMessage := style.FgRed.SetBold().Sprint(strings.TrimSpace(message)) + coloredMessage := style.FgRed.SetBold().Sprint(strings.TrimSpace(err.Error())) if err := self.onErrorFn(); err != nil { return err } |