mirror of
https://github.com/nlohmann/json.git
synced 2024-07-04 21:36:57 +02:00
Update parse_exceptions.md
Referring to https://github.com/nlohmann/json/blob/develop/doc/examples/parse_error.cpp and https://json.nlohmann.me/home/exceptions/ (and also based on testing), the catch command should reference `catch (json::parse_error& ex)` and not `catch (json::exception::parse_error& ex)`
This commit is contained in:
parent
176d8e261a
commit
90d51b9205
|
@ -8,7 +8,7 @@ try
|
||||||
{
|
{
|
||||||
j = json::parse(my_input);
|
j = json::parse(my_input);
|
||||||
}
|
}
|
||||||
catch (json::exception::parse_error& ex)
|
catch (json::parse_error& ex)
|
||||||
{
|
{
|
||||||
std::cerr << "parse error at byte " << ex.byte << std::endl;
|
std::cerr << "parse error at byte " << ex.byte << std::endl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue