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:
@ -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';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user