🔨 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:
Niels Lohmann 2017-07-08 21:35:13 +02:00
parent b38ecb5ca9
commit 87bccbc335
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
2 changed files with 2 additions and 11 deletions

View file

@ -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")