improve error message
This commit is contained in:
parent
bfb1d69abc
commit
d42398666c
|
@ -183,7 +183,7 @@ impl StringSchema {
|
||||||
}
|
}
|
||||||
ApiStringFormat::Enum(ref stringvec) => {
|
ApiStringFormat::Enum(ref stringvec) => {
|
||||||
if stringvec.iter().find(|&e| *e == value) == None {
|
if stringvec.iter().find(|&e| *e == value) == None {
|
||||||
bail!("value is not defined in the enumeration.");
|
bail!("value '{}' is not defined in the enumeration.", value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ApiStringFormat::Complex(ref subschema) => {
|
ApiStringFormat::Complex(ref subschema) => {
|
||||||
|
|
Loading…
Reference in New Issue