diff options
Diffstat (limited to 'include/cru/base/Exception.h')
-rw-r--r-- | include/cru/base/Exception.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/include/cru/base/Exception.h b/include/cru/base/Exception.h index f42406e0..e4da91f5 100644 --- a/include/cru/base/Exception.h +++ b/include/cru/base/Exception.h @@ -1,5 +1,5 @@ #pragma once -#include "String.h" +#include "Base.h" #include <exception> #include <optional> @@ -13,16 +13,10 @@ class CRU_BASE_API Exception : public std::exception { public: explicit Exception(std::string message = "", std::shared_ptr<std::exception> inner = nullptr); - explicit Exception(StringView message, - std::shared_ptr<std::exception> inner = nullptr); ~Exception() override; public: - [[deprecated("Use GetUtf8Message.")]] String GetMessage() const { - return String::FromUtf8(message_); - } - std::string GetUtf8Message() const { return this->message_; } std::exception* GetInner() const noexcept { return inner_.get(); } @@ -35,16 +29,6 @@ class CRU_BASE_API Exception : public std::exception { void AppendMessage(std::string_view additional_message); void AppendMessage(std::optional<std::string_view> additional_message); - [[deprecated("Use void SetMessage(std::string message) instead.")]] - void SetMessage(StringView message); - [[deprecated( - "Use void AppendMessage(std::string_view additional_message) instead.")]] - void AppendMessage(StringView additional_message); - [[deprecated( - "Use void AppendMessage(std::optional<std::string_view> " - "additional_message) instead.")]] - void AppendMessage(std::optional<StringView> additional_message); - private: std::string message_; std::shared_ptr<std::exception> inner_; @@ -71,11 +55,6 @@ class ErrnoException : public Exception { */ explicit ErrnoException(std::string_view message); ErrnoException(std::string_view message, int errno_code); - /** - * @brief will retrieve errno automatically. - */ - explicit ErrnoException(StringView message); - ErrnoException(StringView message, int errno_code); int GetErrnoCode() const { return errno_code_; } |