mirror of
https://github.com/nlohmann/json.git
synced 2025-11-24 03:44:06 +08:00
Capture exceptions by const& in docs. (#4099)
This commit is contained in:
@@ -11,7 +11,7 @@ int main()
|
||||
{
|
||||
std::cout << j_invalid.dump() << std::endl;
|
||||
}
|
||||
catch (json::type_error& e)
|
||||
catch (const json::type_error& e)
|
||||
{
|
||||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user