????????????û????????????
| 6 | |
| 7 | // ????????????û???????????? |
| 8 | class Exception : public std::exception |
| 9 | { |
| 10 | std::string msg; |
| 11 | public: |
| 12 | // ??????????????????????? |
| 13 | Exception() : msg("?????????????") {} |
| 14 | // ??????????????????????????? |
| 15 | explicit Exception(const std::string& message) : msg(message) |
| 16 | { |
| 17 | #if _DEBUG |
| 18 | std::cerr << "Exception constructed: " << message << std::endl; |
| 19 | #endif |
| 20 | } |
| 21 | ~Exception() noexcept override { } |
| 22 | const char* what() const noexcept override { return msg.c_str(); } |
| 23 | }; |
| 24 | |
| 25 | // ????????????????????????????????????????? |
| 26 | class InvalidCastException : public Exception |
no outgoing calls
no test coverage detected