Electroneum
Static Public Member Functions | Private Member Functions | List of all members
nlohmann::detail::out_of_range Class Reference

exception indicating access out of the defined range More...

#include <json.hpp>

Inheritance diagram for nlohmann::detail::out_of_range:
Inheritance graph
[legend]
Collaboration diagram for nlohmann::detail::out_of_range:
Collaboration graph
[legend]

Static Public Member Functions

static out_of_range create (int id, const std::string &what_arg)
 

Private Member Functions

 out_of_range (int id_, const char *what_arg)
 

Additional Inherited Members

- Public Member Functions inherited from nlohmann::detail::exception
virtual const char * what () const noexcept override
 returns the explanatory string More...
 
- Public Attributes inherited from nlohmann::detail::exception
const int id
 the id of the exception More...
 
- Protected Member Functions inherited from nlohmann::detail::exception
 exception (int id_, const char *what_arg)
 
- Static Protected Member Functions inherited from nlohmann::detail::exception
static std::string name (const std::string &ename, int id)
 

Detailed Description

exception indicating access out of the defined range

Exceptions have ids 4xx.

name / id example massage description ----------—
json.exception.out_of_range.401 array index 3 is out of range The provided array index i is larger than size-1.
json.exception.out_of_range.402 array index '-' (3) is out of range The special array index - in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it.
json.exception.out_of_range.403 key 'foo' not found The provided key was not found in the JSON object.
json.exception.out_of_range.404 unresolved reference token 'foo' A reference token in a JSON Pointer could not be resolved.
json.exception.out_of_range.405 JSON pointer has no parent The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value.
json.exception.out_of_range.406 number overflow parsing '10E1000' A parsed number could not be stored as without changing it to NaN or INF.
Since
version 3.0.0

Constructor & Destructor Documentation

◆ out_of_range()

nlohmann::detail::out_of_range::out_of_range ( int  id_,
const char *  what_arg 
)
inlineprivate

Member Function Documentation

◆ create()

static out_of_range nlohmann::detail::out_of_range::create ( int  id,
const std::string what_arg 
)
inlinestatic

The documentation for this class was generated from the following file: