Added class hierarchy for user-defined exceptions (#244). Integrated parse exceptions 101-103. Parse exceptions include the byte count of the last read character to locate the position of the error (#301).
This commit is contained in:
parent
7b8fd864e2
commit
c085e3bac2
9 changed files with 650 additions and 252 deletions
|
|
@ -79,7 +79,7 @@ TEST_CASE("compliance tests from json.org")
|
|||
CAPTURE(filename);
|
||||
json j;
|
||||
std::ifstream f(filename);
|
||||
CHECK_THROWS_AS(j << f, std::invalid_argument);
|
||||
CHECK_THROWS_AS(j << f, json::parse_error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -757,7 +757,7 @@ TEST_CASE("nst's JSONTestSuite")
|
|||
CAPTURE(filename);
|
||||
std::ifstream f(filename);
|
||||
json j;
|
||||
CHECK_THROWS_AS(j << f, std::invalid_argument);
|
||||
CHECK_THROWS_AS(j << f, json::parse_error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -810,7 +810,7 @@ TEST_CASE("nst's JSONTestSuite")
|
|||
CAPTURE(filename);
|
||||
std::ifstream f(filename);
|
||||
json j;
|
||||
CHECK_THROWS_AS(j << f, std::invalid_argument);
|
||||
CHECK_THROWS_AS(j << f, json::parse_error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue