1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-09 11:01:47 +03:00

🔨 added user-defined exceptions 306

This commit is contained in:
Niels Lohmann
2017-03-05 19:15:56 +01:00
parent aa842b4a27
commit bb740c43fb
3 changed files with 87 additions and 64 deletions

View File

@ -4176,7 +4176,7 @@ class basic_json
@return copy of the element at key @a key or @a default_value if @a key
is not found
@throw std::domain_error if JSON is not an object; example: `"cannot use
@throw type_error.306 if JSON is not an object; example: `"cannot use
value() with null"`
@complexity Logarithmic in the size of the container.
@ -4209,7 +4209,7 @@ class basic_json
}
else
{
JSON_THROW(std::domain_error("cannot use value() with " + type_name()));
JSON_THROW(type_error(306, "cannot use value() with " + type_name()));
}
}
@ -4251,7 +4251,7 @@ class basic_json
@return copy of the element at key @a key or @a default_value if @a key
is not found
@throw std::domain_error if JSON is not an object; example: `"cannot use
@throw type_error.306 if JSON is not an object; example: `"cannot use
value() with null"`
@complexity Logarithmic in the size of the container.
@ -4281,7 +4281,7 @@ class basic_json
}
}
JSON_THROW(std::domain_error("cannot use value() with " + type_name()));
JSON_THROW(type_error(306, "cannot use value() with " + type_name()));
}
/*!