Display the attribute which has the error.

This commit is contained in:
Lewis Jessett
2020-01-27 09:36:56 +00:00
parent d644dc6d71
commit 208553a606
+1 -1
View File
@@ -186,7 +186,7 @@ var ErrAttributeNotFound = errors.New("attribute not found")
func (m *Message) Get(t AttrType) ([]byte, error) {
v, ok := m.Attributes.Get(t)
if !ok {
return nil, ErrAttributeNotFound
return nil, errors.New("attribute not found " + t.String())
}
return v.Value, nil
}