From 90d51b9205131106739ef06d09a75701eb4d406d Mon Sep 17 00:00:00 2001 From: Fraser Date: Thu, 18 Mar 2021 12:25:12 -0400 Subject: [PATCH] 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)` --- doc/mkdocs/docs/features/parsing/parse_exceptions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mkdocs/docs/features/parsing/parse_exceptions.md b/doc/mkdocs/docs/features/parsing/parse_exceptions.md index b882e0b5ca..f0569b8e21 100644 --- a/doc/mkdocs/docs/features/parsing/parse_exceptions.md +++ b/doc/mkdocs/docs/features/parsing/parse_exceptions.md @@ -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; }