mirror of
https://github.com/nlohmann/json.git
synced 2026-02-27 13:56:26 +00:00
🔨 removed exception parse_error.111
It makes no sense to have this special exception. Instead of throwing when an input adapter is created, it is better to detect a parse error in later usage when an EOF is "read" unexpectedly.
This commit is contained in:
@@ -581,7 +581,7 @@ TEST_CASE("regression tests")
|
||||
{
|
||||
std::ifstream f("file_not_found.json");
|
||||
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");
|
||||
CHECK_THROWS_WITH(json::parse(f), "[json.exception.parse_error.101] parse error at 1: syntax error - unexpected end of input; expected '[', '{', or a literal");
|
||||
}
|
||||
|
||||
SECTION("issue #367 - calling stream at EOF")
|
||||
|
||||
Reference in New Issue
Block a user