mirror of
https://github.com/nlohmann/json.git
synced 2026-11-15 20:08:03 +00:00
added user-defined exceptions 404-405
This commit is contained in:
4 files changed
+35
-28
No files matched your search
@@ -791,8 +791,9 @@ TEST_CASE("JSON patch")
|
||||
{
|
||||
json j = "string";
|
||||
json patch = {{{"op", "remove"}, {"path", ""}}};
|
||||
CHECK_THROWS_AS(j.patch(patch), std::domain_error);
|
||||
CHECK_THROWS_WITH(j.patch(patch), "JSON pointer has no parent");
|
||||
CHECK_THROWS_AS(j.patch(patch), json::out_of_range);
|
||||
CHECK_THROWS_WITH(j.patch(patch),
|
||||
"[json.exception.out_of_range.405] JSON pointer has no parent");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user