1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-22 15:21:52 +03:00

🔨 added user-defined exception 111

This commit is contained in:
Niels Lohmann
2017-03-06 22:37:46 +01:00
parent 21ec0e7806
commit 5407333224
3 changed files with 6 additions and 5 deletions

View File

@ -565,7 +565,8 @@ TEST_CASE("regression tests")
SECTION("issue #366 - json::parse on failed stream gets stuck")
{
std::ifstream f("file_not_found.json");
CHECK_THROWS_AS(json::parse(f), std::invalid_argument);
CHECK_THROWS_AS(json::parse(f), json::parse_error);
CHECK_THROWS_WITH(json::parse(f), "[json.exception.parse_error.111] parse error: bad input stream");
}
SECTION("issue #367 - calling stream at EOF")