| 141 | }; |
| 142 | |
| 143 | class internal_error final : public std::exception { |
| 144 | std::string mWhat = "Internal Error"; |
| 145 | |
| 146 | public: |
| 147 | internal_error() = default; |
| 148 | |
| 149 | explicit internal_error(const std::string &str) noexcept : mWhat("Internal Error: " + str) {} |
| 150 | |
| 151 | internal_error(const internal_error &) = default; |
| 152 | |
| 153 | internal_error(internal_error &&) noexcept = default; |
| 154 | |
| 155 | ~internal_error() override = default; |
| 156 | |
| 157 | internal_error &operator=(const internal_error &) = default; |
| 158 | |
| 159 | internal_error &operator=(internal_error &&) = default; |
| 160 | |
| 161 | const char *what() const noexcept override |
| 162 | { |
| 163 | return this->mWhat.c_str(); |
| 164 | } |
| 165 | }; |
| 166 | |
| 167 | class lang_error final { |
| 168 | std::string mWhat; |
no outgoing calls
no test coverage detected