be clearer on type-validation-errors
This commit is contained in:
parent
881be19ca7
commit
d0781a8a45
@ -147,8 +147,8 @@ void validate_type(const json &schema, const std::string &expected_type, const s
|
||||
(type_instance == "number" && expected_type == "integer"))
|
||||
return;
|
||||
|
||||
throw std::invalid_argument(name + " should be a " + expected_type +
|
||||
", but is a " + type_instance.get<std::string>());
|
||||
throw std::invalid_argument(name + " is " + expected_type +
|
||||
", but required type is " + type_instance.get<std::string>());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user