aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/Exception.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2023-10-05 20:56:07 +0800
committercrupest <crupest@outlook.com>2023-10-05 20:56:07 +0800
commit6cd1d68baf219b5d3c742ba5fb3a9ee04e830999 (patch)
tree523c97530f235139ef89f9137997ca4b70b32237 /include/cru/common/Exception.h
parentb09a5c7cea5b4eb32b3318c97b046f018b297d8c (diff)
downloadcru-6cd1d68baf219b5d3c742ba5fb3a9ee04e830999.tar.gz
cru-6cd1d68baf219b5d3c742ba5fb3a9ee04e830999.tar.bz2
cru-6cd1d68baf219b5d3c742ba5fb3a9ee04e830999.zip
...
Diffstat (limited to 'include/cru/common/Exception.h')
-rw-r--r--include/cru/common/Exception.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/cru/common/Exception.h b/include/cru/common/Exception.h
index 6f458d35..d7e32a5a 100644
--- a/include/cru/common/Exception.h
+++ b/include/cru/common/Exception.h
@@ -20,6 +20,9 @@ class CRU_BASE_API Exception : public std::exception {
const char* what() const noexcept override;
+ protected:
+ void SetMessage(String message) { message_ = std::move(message); }
+
private:
String message_;
mutable std::string utf8_message_;