🔨 started with user-defined exceptions #301 #244

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:
Niels Lohmann
2017-03-01 21:28:44 +01:00
parent 7b8fd864e2
commit c085e3bac2
9 changed files with 650 additions and 252 deletions

View File

@@ -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);
}
}
}