diff options
author | Aria <me@aria.rip> | 2023-02-03 15:48:00 +0000 |
---|---|---|
committer | Aria <me@aria.rip> | 2023-02-03 15:48:00 +0000 |
commit | 15c9b9308d353d558f7c4fc2fe03012afc84be40 (patch) | |
tree | faff8319ffc87d10447274a12751ddc43216649d /confirm.go | |
parent | 8c3b1aee5a253416523de78877ae03c3868cc62c (diff) |
better error handling
Diffstat (limited to 'confirm.go')
-rw-r--r-- | confirm.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -82,6 +82,9 @@ func (m confirmModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.viewport.Width = msg.Width - padding_h m.viewport.Height = msg.Height - verticalMarginHeight - padding_v } + case fatalErrorMsg: + fmt.Printf("encountered fatal error: %s\n", msg.Error()) + return m, tea.Quit } // Handle keyboard and mouse events in the viewport |