exception indicating other library errors
More...
#include <json.hpp>
|
const char * | what () const noexcept override |
| returns the explanatory string
|
|
|
template<typename BasicJsonType > |
static other_error | create (int id_, const std::string &what_arg, const BasicJsonType &context) |
|
|
const int | id |
| the id of the exception
|
|
|
template<typename BasicJsonType > |
static std::string | diagnostics (const BasicJsonType &leaf_element) |
|
static std::string | name (const std::string &ename, int id_) |
|
|
std::runtime_error | m |
| an exception object as storage for error messages
|
|
exception indicating other library errors
- See also
- https://json.nlohmann.me/api/basic_json/other_error/
Definition at line 3005 of file json.hpp.
◆ other_error()
nlohmann::detail::other_error::other_error |
( |
int |
id_, |
|
|
const char * |
what_arg |
|
) |
| |
|
inlineprivate |
◆ create()
template<typename BasicJsonType >
static other_error nlohmann::detail::other_error::create |
( |
int |
id_, |
|
|
const std::string & |
what_arg, |
|
|
const BasicJsonType & |
context |
|
) |
| |
|
inlinestatic |
Definition at line 3009 of file json.hpp.
References nlohmann::detail::exception::diagnostics(), and nlohmann::detail::exception::name().
Referenced by nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::json_value(), and nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::patch().
◆ diagnostics()
template<typename BasicJsonType >
static std::string nlohmann::detail::exception::diagnostics |
( |
const BasicJsonType & |
leaf_element | ) |
|
|
inlinestaticprotectedinherited |
Definition at line 2830 of file json.hpp.
References nlohmann::detail::array, nlohmann::detail::binary, nlohmann::detail::boolean, nlohmann::detail::discarded, nlohmann::detail::null, nlohmann::detail::number_float, nlohmann::detail::number_integer, nlohmann::detail::number_unsigned, nlohmann::detail::object, and nlohmann::detail::string.
Referenced by nlohmann::detail::parse_error::create(), nlohmann::detail::invalid_iterator::create(), nlohmann::detail::type_error::create(), nlohmann::detail::out_of_range::create(), create(), and nlohmann::detail::parse_error::create().
◆ name()
static std::string nlohmann::detail::exception::name |
( |
const std::string & |
ename, |
|
|
int |
id_ |
|
) |
| |
|
inlinestaticprotectedinherited |
◆ what()
const char * nlohmann::detail::exception::what |
( |
| ) |
const |
|
inlineoverridenoexceptinherited |
◆ id
const int nlohmann::detail::exception::id |
|
inherited |
the id of the exception
Definition at line 2818 of file json.hpp.
std::runtime_error nlohmann::detail::exception::m |
|
privateinherited |
The documentation for this class was generated from the following file: