Browse Source

fix #1559

Improve debuggability of some config deserialization errors
tags/v2.6.0-rc1
Shivaram Lingamneni 3 years ago
parent
commit
29666107ab
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      irc/config.go

+ 4
- 0
irc/config.go View File

@@ -162,6 +162,8 @@ func (ps *PersistentStatus) UnmarshalYAML(unmarshal func(interface{}) error) err
162 162
 			result = PersistentDisabled
163 163
 		}
164 164
 		*ps = result
165
+	} else {
166
+		err = fmt.Errorf("invalid value `%s` for server persistence status: %w", orig, err)
165 167
 	}
166 168
 	return err
167 169
 }
@@ -416,6 +418,8 @@ func (nr *NickEnforcementMethod) UnmarshalYAML(unmarshal func(interface{}) error
416 418
 	method, err := nickReservationFromString(orig)
417 419
 	if err == nil {
418 420
 		*nr = method
421
+	} else {
422
+		err = fmt.Errorf("invalid value `%s` for nick enforcement method: %w", orig, err)
419 423
 	}
420 424
 	return err
421 425
 }

Loading…
Cancel
Save