Add type to swap() exception messages
This commit is contained in:
parent
f4946eb8ef
commit
b75823bb06
@ -3452,7 +3452,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap() with ", type_name()), this));
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap(array_t&) with ", type_name()), this));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3468,7 +3468,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap() with ", type_name()), this));
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap(object_t&) with ", type_name()), this));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3484,7 +3484,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap() with ", type_name()), this));
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap(string_t&) with ", type_name()), this));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3500,7 +3500,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap() with ", type_name()), this));
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap(binary_t&) with ", type_name()), this));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3516,7 +3516,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap() with ", type_name()), this));
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap(binary_t::container_type&) with ", type_name()), this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -22279,7 +22279,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap() with ", type_name()), this));
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap(array_t&) with ", type_name()), this));
|
||||
}
|
||||
}
|
||||
|
||||
@ -22295,7 +22295,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap() with ", type_name()), this));
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap(object_t&) with ", type_name()), this));
|
||||
}
|
||||
}
|
||||
|
||||
@ -22311,7 +22311,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap() with ", type_name()), this));
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap(string_t&) with ", type_name()), this));
|
||||
}
|
||||
}
|
||||
|
||||
@ -22327,7 +22327,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap() with ", type_name()), this));
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap(binary_t&) with ", type_name()), this));
|
||||
}
|
||||
}
|
||||
|
||||
@ -22343,7 +22343,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap() with ", type_name()), this));
|
||||
JSON_THROW(type_error::create(310, detail::concat("cannot use swap(binary_t::container_type&) with ", type_name()), this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -855,7 +855,7 @@ TEST_CASE("modifiers")
|
||||
json j = 17;
|
||||
json::array_t a = {"foo", "bar", "baz"};
|
||||
|
||||
CHECK_THROWS_WITH_AS(j.swap(a), "[json.exception.type_error.310] cannot use swap() with number", json::type_error&);
|
||||
CHECK_THROWS_WITH_AS(j.swap(a), "[json.exception.type_error.310] cannot use swap(array_t&) with number", json::type_error&);
|
||||
}
|
||||
}
|
||||
|
||||
@ -880,7 +880,7 @@ TEST_CASE("modifiers")
|
||||
json j = 17;
|
||||
json::object_t o = {{"cow", "Kuh"}, {"chicken", "Huhn"}};
|
||||
|
||||
CHECK_THROWS_WITH_AS(j.swap(o), "[json.exception.type_error.310] cannot use swap() with number", json::type_error&);
|
||||
CHECK_THROWS_WITH_AS(j.swap(o), "[json.exception.type_error.310] cannot use swap(object_t&) with number", json::type_error&);
|
||||
}
|
||||
}
|
||||
|
||||
@ -905,7 +905,7 @@ TEST_CASE("modifiers")
|
||||
json j = 17;
|
||||
json::string_t s = "Hallo Welt";
|
||||
|
||||
CHECK_THROWS_WITH_AS(j.swap(s), "[json.exception.type_error.310] cannot use swap() with number", json::type_error&);
|
||||
CHECK_THROWS_WITH_AS(j.swap(s), "[json.exception.type_error.310] cannot use swap(string_t&) with number", json::type_error&);
|
||||
}
|
||||
}
|
||||
|
||||
@ -945,8 +945,8 @@ TEST_CASE("modifiers")
|
||||
json::binary_t s1 = {{1, 2, 3, 4}};
|
||||
std::vector<std::uint8_t> s2 = {{5, 6, 7, 8}};
|
||||
|
||||
CHECK_THROWS_WITH_AS(j.swap(s1), "[json.exception.type_error.310] cannot use swap() with number", json::type_error);
|
||||
CHECK_THROWS_WITH_AS(j.swap(s2), "[json.exception.type_error.310] cannot use swap() with number", json::type_error);
|
||||
CHECK_THROWS_WITH_AS(j.swap(s1), "[json.exception.type_error.310] cannot use swap(binary_t&) with number", json::type_error);
|
||||
CHECK_THROWS_WITH_AS(j.swap(s2), "[json.exception.type_error.310] cannot use swap(binary_t::container_type&) with number", json::type_error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user