| 165 | }; |
| 166 | |
| 167 | class lang_error final { |
| 168 | std::string mWhat; |
| 169 | |
| 170 | public: |
| 171 | lang_error() = default; |
| 172 | |
| 173 | explicit lang_error(std::string str) noexcept : mWhat(std::move(str)) {} |
| 174 | |
| 175 | lang_error(const lang_error &) = default; |
| 176 | |
| 177 | lang_error(lang_error &&) noexcept = default; |
| 178 | |
| 179 | ~lang_error() = default; |
| 180 | |
| 181 | lang_error &operator=(const lang_error &) = default; |
| 182 | |
| 183 | lang_error &operator=(lang_error &&) = default; |
| 184 | |
| 185 | const char *what() const noexcept |
| 186 | { |
| 187 | return this->mWhat.c_str(); |
| 188 | } |
| 189 | }; |
| 190 | |
| 191 | class fatal_error final : public std::exception { |
| 192 | std::string mWhat = "Fatal Error"; |
no outgoing calls
no test coverage detected