Skip to content

Commit

Permalink
📝 mention 302 exception in value() documentation #1601
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Jun 22, 2019
1 parent 13d4f8f commit 3b82a35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3388,6 +3388,8 @@ class basic_json
@return copy of the element at key @a key or @a default_value if @a key
is not found
@throw type_error.302 if @a default_value does not match the type of the
value at @a key
@throw type_error.306 if the JSON value is not an object; in that case,
using `value()` with a key makes no sense.
Expand Down Expand Up @@ -3461,6 +3463,8 @@ class basic_json
@return copy of the element at key @a key or @a default_value if @a key
is not found
@throw type_error.302 if @a default_value does not match the type of the
value at @a ptr
@throw type_error.306 if the JSON value is not an object; in that case,
using `value()` with a key makes no sense.
Expand Down
4 changes: 4 additions & 0 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16189,6 +16189,8 @@ class basic_json
@return copy of the element at key @a key or @a default_value if @a key
is not found

@throw type_error.302 if @a default_value does not match the type of the
value at @a key
@throw type_error.306 if the JSON value is not an object; in that case,
using `value()` with a key makes no sense.

Expand Down Expand Up @@ -16262,6 +16264,8 @@ class basic_json
@return copy of the element at key @a key or @a default_value if @a key
is not found

@throw type_error.302 if @a default_value does not match the type of the
value at @a ptr
@throw type_error.306 if the JSON value is not an object; in that case,
using `value()` with a key makes no sense.

Expand Down

0 comments on commit 3b82a35

Please sign in to comment.