Class other_error

Inheritance Relationships

Base Types

Class Documentation

class other_error : public nlohmann::detail::exception, public nlohmann::detail::exception

exception indicating other library errors

This exception is thrown in case of errors that cannot be classified with the other exception types.

Exceptions have ids 5xx.

name / id

example message

description

json.exception.other_error.501

unsuccessful: {“op”:”test”,”path”:”/baz”, “value”:”bar”}

A JSON Patch operation ‘test’ failed. The unsuccessful operation is also printed.

@liveexample{The following code shows how an other_error exception can be caught.,other_error}

See also

- exception for the base class of the library exceptions

See also

- parse_error for exceptions indicating a parse error

See also

- invalid_iterator for exceptions indicating errors with iterators

See also

- type_error for exceptions indicating executing a member function with a wrong type

See also

- out_of_range for exceptions indicating access out of the defined range

Since

version 3.0.0

Public Static Functions

static inline other_error create(int id_, const std::string &what_arg)
static inline other_error create(int id_, const std::string &what_arg)