! @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_err
| 2647 | @since version 3.0.0 |
| 2648 | */ |
| 2649 | class other_error : public exception |
| 2650 | { |
| 2651 | public: |
| 2652 | static other_error create(int id_, const std::string& what_arg) |
| 2653 | { |
| 2654 | std::string w = exception::name("other_error", id_) + what_arg; |
| 2655 | return other_error(id_, w.c_str()); |
| 2656 | } |
| 2657 | |
| 2658 | private: |
| 2659 | JSON_HEDLEY_NON_NULL(3) |
| 2660 | other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} |
| 2661 | }; |
| 2662 | } // namespace detail |
| 2663 | } // namespace nlohmann |
| 2664 |