Skip to content

Commit

Permalink
Update parse_exceptions.md
Browse files Browse the repository at this point in the history
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)`
  • Loading branch information
frasermarlow authored Mar 18, 2021
1 parent 176d8e2 commit 90d51b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/mkdocs/docs/features/parsing/parse_exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ try
{
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;
}
Expand Down

0 comments on commit 90d51b9

Please sign in to comment.