mirror of
https://github.com/nlohmann/json.git
synced 2025-07-22 15:21:52 +03:00
📝 overworked documentation
Replacing references to std exceptions with user-defined exceptions. Also changed some examples to the new exceptions.
This commit is contained in:
@ -19,9 +19,9 @@ int main()
|
||||
{
|
||||
json::json_pointer p9("foo");
|
||||
}
|
||||
catch (std::domain_error& e)
|
||||
catch (json::parse_error& e)
|
||||
{
|
||||
std::cout << "domain_error: " << e.what() << '\n';
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// error: JSON pointer uses escape symbol ~ not followed by 0 or 1
|
||||
@ -29,9 +29,9 @@ int main()
|
||||
{
|
||||
json::json_pointer p10("/foo/~");
|
||||
}
|
||||
catch (std::domain_error& e)
|
||||
catch (json::parse_error& e)
|
||||
{
|
||||
std::cout << "domain_error: " << e.what() << '\n';
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// error: JSON pointer uses escape symbol ~ not followed by 0 or 1
|
||||
@ -39,8 +39,8 @@ int main()
|
||||
{
|
||||
json::json_pointer p11("/foo/~3");
|
||||
}
|
||||
catch (std::domain_error& e)
|
||||
catch (json::parse_error& e)
|
||||
{
|
||||
std::cout << "domain_error: " << e.what() << '\n';
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user