| 88 | namespace jsonpatch { |
| 89 | |
| 90 | class jsonpatch_error : public std::system_error, public virtual json_exception |
| 91 | { |
| 92 | public: |
| 93 | jsonpatch_error(const std::error_code& ec) |
| 94 | : std::system_error(ec) |
| 95 | { |
| 96 | } |
| 97 | |
| 98 | jsonpatch_error(const jsonpatch_error& other) = default; |
| 99 | |
| 100 | jsonpatch_error(jsonpatch_error&& other) = default; |
| 101 | |
| 102 | jsonpatch_error& operator=(const jsonpatch_error& e) = default; |
| 103 | jsonpatch_error& operator=(jsonpatch_error&& e) = default; |
| 104 | |
| 105 | const char* what() const noexcept override |
| 106 | { |
| 107 | return std::system_error::what(); |
| 108 | } |
| 109 | }; |
| 110 | |
| 111 | } // namespace jsonpatch |
| 112 | } // namespace jsoncons |