diff options
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 |