! @brief 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", "valu
| 2158 | @since version 3.0.0 |
| 2159 | */ |
| 2160 | class other_error : public exception |
| 2161 | { |
| 2162 | public: |
| 2163 | static other_error create(int id_, const std::string& what_arg) |
| 2164 | { |
| 2165 | std::string w = exception::name("other_error", id_) + what_arg; |
| 2166 | return other_error(id_, w.c_str()); |
| 2167 | } |
| 2168 | |
| 2169 | private: |
| 2170 | JSON_HEDLEY_NON_NULL(3) |
| 2171 | other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} |
| 2172 | }; |
| 2173 | } // namespace detail |
| 2174 | } // namespace nlohmann |
| 2175 |