mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 09:40:19 +01:00
pyln-proto: make an error message more detailed
Easier to figure out what's going wrong
This commit is contained in:
parent
5142dc81f6
commit
cbde1f8158
1 changed files with 1 additions and 1 deletions
|
@ -248,7 +248,7 @@ other types. Since 'msgtype' is almost identical, it inherits from this too.
|
|||
fieldname, s = s.split('=', 1)
|
||||
f = self.find_field(fieldname)
|
||||
if f is None:
|
||||
raise ValueError("Unknown field name {}".format(fieldname))
|
||||
raise ValueError("Unknown field name '{}'. Expected one of [{}])".format(fieldname, ','.join(str(f) for f in self.fields)))
|
||||
ret[fieldname], s = f.fieldtype.val_from_str(s)
|
||||
if s[0] == ',':
|
||||
s = s[1:]
|
||||
|
|
Loading…
Add table
Reference in a new issue