diff options
author | crupest <crupest@outlook.com> | 2021-08-12 21:44:32 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-08-12 21:44:32 +0800 |
commit | 2e379441f69c4fd3049d186f76b25457e6250282 (patch) | |
tree | 893771e5103ca9f3a34bb622251aaacb024cf1c2 /include/cru/common/Exception.hpp | |
parent | d718b0f576aeae1fa853124caefc8b0078f1deed (diff) | |
download | cru-2e379441f69c4fd3049d186f76b25457e6250282.tar.gz cru-2e379441f69c4fd3049d186f76b25457e6250282.tar.bz2 cru-2e379441f69c4fd3049d186f76b25457e6250282.zip |
...
Diffstat (limited to 'include/cru/common/Exception.hpp')
-rw-r--r-- | include/cru/common/Exception.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/cru/common/Exception.hpp b/include/cru/common/Exception.hpp new file mode 100644 index 00000000..861bf5e9 --- /dev/null +++ b/include/cru/common/Exception.hpp @@ -0,0 +1,21 @@ +#pragma once +#include "String.hpp" + +namespace cru { +class CRU_BASE_API Exception { + public: + Exception() = default; + Exception(String message) : message_(std::move(message)) {} + + CRU_DEFAULT_COPY(Exception) + CRU_DEFAULT_MOVE(Exception) + + virtual ~Exception() = default; + + public: + String GetMessage() const { return message_; } + + private: + String message_; +}; +} // namespace cru |