diff options
author | crupest <crupest@outlook.com> | 2023-10-12 17:47:30 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-10-12 17:47:30 +0800 |
commit | 0ec90627298b8b7bdc74a3993ca58f1dde14dc26 (patch) | |
tree | 6bd6d25debf39bf969864b75599e824497b094a6 /include/cru/common | |
parent | 9a077caa6d3f7eb8255ae68916dccac9b50a4333 (diff) | |
download | cru-0ec90627298b8b7bdc74a3993ca58f1dde14dc26.tar.gz cru-0ec90627298b8b7bdc74a3993ca58f1dde14dc26.tar.bz2 cru-0ec90627298b8b7bdc74a3993ca58f1dde14dc26.zip |
...
Diffstat (limited to 'include/cru/common')
-rw-r--r-- | include/cru/common/Exception.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cru/common/Exception.h b/include/cru/common/Exception.h index d7e32a5a..06a10030 100644 --- a/include/cru/common/Exception.h +++ b/include/cru/common/Exception.h @@ -1,6 +1,8 @@ #pragma once #include "String.h" +#include <optional> + namespace cru { #ifdef _MSC_VER #pragma warning(disable : 4275) @@ -23,6 +25,9 @@ class CRU_BASE_API Exception : public std::exception { protected: void SetMessage(String message) { message_ = std::move(message); } + void AppendMessage(StringView additional_message); + void AppendMessage(std::optional<StringView> additional_message); + private: String message_; mutable std::string utf8_message_; |