From 29666107abc6a1ca76d7ebc54f0d86cf105e86f5 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Fri, 26 Feb 2021 01:10:21 -0500 Subject: [PATCH] fix #1559 Improve debuggability of some config deserialization errors --- irc/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/irc/config.go b/irc/config.go index fc87c059..a050b46a 100644 --- a/irc/config.go +++ b/irc/config.go @@ -162,6 +162,8 @@ func (ps *PersistentStatus) UnmarshalYAML(unmarshal func(interface{}) error) err result = PersistentDisabled } *ps = result + } else { + err = fmt.Errorf("invalid value `%s` for server persistence status: %w", orig, err) } return err } @@ -416,6 +418,8 @@ func (nr *NickEnforcementMethod) UnmarshalYAML(unmarshal func(interface{}) error method, err := nickReservationFromString(orig) if err == nil { *nr = method + } else { + err = fmt.Errorf("invalid value `%s` for nick enforcement method: %w", orig, err) } return err }