47 const char*
what() const noexcept
override 56 exception(
int id_,
const char* what_arg) : id(id_), m(what_arg) {}
60 return "[json.exception." + ename +
"." + std::to_string(id_) +
"] ";
124 std::string w = exception::name(
"parse_error", id_) +
"parse error" +
125 (byte_ != 0 ? (
" at " + std::to_string(byte_)) :
"") +
142 parse_error(
int id_, std::size_t byte_,
const char* what_arg)
143 :
exception(id_, what_arg), byte(byte_) {}
188 std::string w = exception::name(
"invalid_iterator", id_) + what_arg;
240 std::string w = exception::name(
"type_error", id_) + what_arg;
284 std::string w = exception::name(
"out_of_range", id_) + what_arg;
321 std::string w = exception::name(
"other_error", id_) + what_arg;
const int id
the id of the exception
Definition: exceptions.hpp:53
const char * what() const noexcept override
returns the explanatory string
Definition: exceptions.hpp:47
const std::size_t byte
byte index of the parse error
Definition: exceptions.hpp:139
exception indicating access out of the defined range
Definition: exceptions.hpp:279
exception indicating a parse error
Definition: exceptions.hpp:111
general exception of the basic_json class
Definition: exceptions.hpp:43
exception indicating errors with iterators
Definition: exceptions.hpp:183
namespace for Niels Lohmann
Definition: adl_serializer.hpp:8
exception indicating executing a member function with a wrong type
Definition: exceptions.hpp:235
exception indicating other library errors
Definition: exceptions.hpp:316
static parse_error create(int id_, std::size_t byte_, const std::string &what_arg)
create a parse error exception
Definition: exceptions.hpp:122