| 117 | }; |
| 118 | |
| 119 | class runtime_error final : public std::exception { |
| 120 | std::string mWhat = "Runtime Error"; |
| 121 | |
| 122 | public: |
| 123 | runtime_error() = default; |
| 124 | |
| 125 | explicit runtime_error(const std::string &str) noexcept : mWhat("Runtime Error: " + str) {} |
| 126 | |
| 127 | runtime_error(const runtime_error &) = default; |
| 128 | |
| 129 | runtime_error(runtime_error &&) noexcept = default; |
| 130 | |
| 131 | ~runtime_error() override = default; |
| 132 | |
| 133 | runtime_error &operator=(const runtime_error &) = default; |
| 134 | |
| 135 | runtime_error &operator=(runtime_error &&) = default; |
| 136 | |
| 137 | const char *what() const noexcept override |
| 138 | { |
| 139 | return this->mWhat.c_str(); |
| 140 | } |
| 141 | }; |
| 142 | |
| 143 | class internal_error final : public std::exception { |
| 144 | std::string mWhat = "Internal Error"; |
no outgoing calls
no test coverage detected