diff options
-rw-r--r-- | examples/example09_nlohmann_json.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/example09_nlohmann_json.cpp b/examples/example09_nlohmann_json.cpp index bf8db5c..ad94fac 100644 --- a/examples/example09_nlohmann_json.cpp +++ b/examples/example09_nlohmann_json.cpp @@ -106,7 +106,6 @@ int main(int argc, char *argv[]) { handle_error(answer); } - } catch (const masto::CURLException &e) { @@ -114,6 +113,10 @@ int main(int argc, char *argv[]) // There went probably something wrong with the initialization. cerr << e.what() << '\n'; } + catch (const nlohmann::detail::exception &e) + { + cerr << "JSON exception: " << e.what() << '\n'; + } } void handle_error(const masto::answer_type &answer) |