From d0781a8a45975168c0c0b7332eed544b59562d1d Mon Sep 17 00:00:00 2001 From: Patrick Boettcher Date: Fri, 27 Jan 2017 10:39:24 +0100 Subject: [PATCH] be clearer on type-validation-errors --- src/json-validator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json-validator.cpp b/src/json-validator.cpp index 4befd08..6f6f11a 100644 --- a/src/json-validator.cpp +++ b/src/json-validator.cpp @@ -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()); + throw std::invalid_argument(name + " is " + expected_type + + ", but required type is " + type_instance.get()); } }