Skip to content

Commit

Permalink
Add type to swap() exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
falbrechtskirchinger committed Jul 26, 2022
1 parent f4946eb commit 08c507f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand All @@ -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));
}
}

Expand All @@ -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));
}
}

Expand All @@ -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));
}
}

Expand All @@ -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));
}
}

Expand Down
10 changes: 5 additions & 5 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand All @@ -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));
}
}

Expand All @@ -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));
}
}

Expand All @@ -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));
}
}

Expand All @@ -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));
}
}

Expand Down

0 comments on commit 08c507f

Please sign in to comment.