1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-06 06:42:33 +03:00

📝 more documentation for the new exceptions

This commit is contained in:
Niels Lohmann
2017-03-08 23:12:13 +01:00
parent fe71e7df1f
commit 1ab580d6e9
15 changed files with 269 additions and 230 deletions

View File

@ -18,4 +18,14 @@ int main()
std::cout << j_array_range << '\n';
std::cout << j_number_range << '\n';
std::cout << j_object_range << '\n';
// example for an exception
try
{
json j_invalid(j_number.begin() + 1, j_number.end());
}
catch (json::invalid_iterator& e)
{
std::cout << e.what() << '\n';
}
}