aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/msglist.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-01-10 23:28:35 +0100
committerRobin Jarry <robin@jarry.cc>2023-01-11 14:12:16 +0100
commitbf0a3e0056d6dad150e418f758c9c6778db9d4ba (patch)
tree2d67365a628d81f6f74d4ec8337a47b72d541318 /widgets/msglist.go
parent04303172d4f96b284e0c915ce4a7b87e1439bb87 (diff)
downloadaerc-bf0a3e0056d6dad150e418f758c9c6778db9d4ba.tar.gz
msglist: log template errors
The template exec errors can be rather verbose and may be truncated when the table is rendered. Log them as errors so that they can be inspected by users. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r--widgets/msglist.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index fffea99e..85072d1e 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -264,6 +264,7 @@ func addMessage(
var buf bytes.Buffer
err := col.Def.Template.Execute(&buf, data)
if err != nil {
+ log.Errorf("<%s> %s", msg.Envelope.MessageId, err)
cells[c] = err.Error()
} else {
cells[c] = buf.String()