| 93 | }; |
| 94 | |
| 95 | class compile_error final : public std::exception { |
| 96 | std::string mWhat = "Compile Error"; |
| 97 | |
| 98 | public: |
| 99 | compile_error() = default; |
| 100 | |
| 101 | explicit compile_error(const std::string &str) noexcept : mWhat("Compile Error: " + str) {} |
| 102 | |
| 103 | compile_error(const compile_error &) = default; |
| 104 | |
| 105 | compile_error(compile_error &&) noexcept = default; |
| 106 | |
| 107 | ~compile_error() override = default; |
| 108 | |
| 109 | compile_error &operator=(const compile_error &) = default; |
| 110 | |
| 111 | compile_error &operator=(compile_error &&) = default; |
| 112 | |
| 113 | const char *what() const noexcept override |
| 114 | { |
| 115 | return this->mWhat.c_str(); |
| 116 | } |
| 117 | }; |
| 118 | |
| 119 | class runtime_error final : public std::exception { |
| 120 | std::string mWhat = "Runtime Error"; |
no outgoing calls
no test coverage detected