From 7b5316ddfabd21ff5ccb36fc398a267d16ab92b8 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 7 Nov 2018 12:14:52 +0100 Subject: [PATCH] improve error messages --- src/json_schema.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json_schema.rs b/src/json_schema.rs index df97092b..a6b7c1fc 100644 --- a/src/json_schema.rs +++ b/src/json_schema.rs @@ -122,7 +122,7 @@ fn parse_simple_value(value_str: &str, schema: &Jss) -> Result { let value = match schema { Jss::Null => { - bail!("parse_parameter_strings: internal error - schema contains Null."); + bail!("internal error - found Null schema."); } Jss::Boolean(jss_boolean) => { let res = match value_str.to_lowercase().as_str() { @@ -167,7 +167,7 @@ fn parse_simple_value(value_str: &str, schema: &Jss) -> Result { Value::String(res) } - _ => bail!("parse_simple_value: schema contains complex Objects."), + _ => bail!("unable to parse complex (sub) objects."), }; Ok(value) }