improve error messages

This commit is contained in:
Dietmar Maurer 2018-11-07 12:14:52 +01:00
parent 7c32470aea
commit 7b5316ddfa
1 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ fn parse_simple_value(value_str: &str, schema: &Jss) -> Result<Value, Error> {
let value = match schema { let value = match schema {
Jss::Null => { Jss::Null => {
bail!("parse_parameter_strings: internal error - schema contains Null."); bail!("internal error - found Null schema.");
} }
Jss::Boolean(jss_boolean) => { Jss::Boolean(jss_boolean) => {
let res = match value_str.to_lowercase().as_str() { let res = match value_str.to_lowercase().as_str() {
@ -167,7 +167,7 @@ fn parse_simple_value(value_str: &str, schema: &Jss) -> Result<Value, Error> {
Value::String(res) Value::String(res)
} }
_ => bail!("parse_simple_value: schema contains complex Objects."), _ => bail!("unable to parse complex (sub) objects."),
}; };
Ok(value) Ok(value)
} }