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

added line positions to error messages

This is a follow-up to #1210.
This commit is contained in:
Niels Lohmann
2018-10-07 12:27:24 +02:00
parent ac38e95780
commit 011b15dd08
13 changed files with 725 additions and 278 deletions

View File

@ -39,7 +39,7 @@ TEST_CASE("JSON pointers")
{
CHECK_THROWS_AS(json::json_pointer("foo"), json::parse_error&);
CHECK_THROWS_WITH(json::json_pointer("foo"),
"[json.exception.parse_error.107] parse error at 1: JSON pointer must be empty or begin with '/' - was: 'foo'");
"[json.exception.parse_error.107] parse error at byte 1: JSON pointer must be empty or begin with '/' - was: 'foo'");
CHECK_THROWS_AS(json::json_pointer("/~~"), json::parse_error&);
CHECK_THROWS_WITH(json::json_pointer("/~~"),