diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-09-04 22:51:27 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-09-04 22:51:27 +0800 |
commit | fdddc7f4a8884a8481dc71c0f34b8775659ba236 (patch) | |
tree | 7b43bc30a7666f4dc2a87e7999a9f26d911dbe66 /include/cru/base/Exception.h | |
parent | 2ac35f7b67eac709cdae7981880f7d117f9a9d75 (diff) | |
download | cru-fdddc7f4a8884a8481dc71c0f34b8775659ba236.tar.gz cru-fdddc7f4a8884a8481dc71c0f34b8775659ba236.tar.bz2 cru-fdddc7f4a8884a8481dc71c0f34b8775659ba236.zip |
UnixFileDescriptor Read and ErrnoException std::string.
Diffstat (limited to 'include/cru/base/Exception.h')
-rw-r--r-- | include/cru/base/Exception.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/cru/base/Exception.h b/include/cru/base/Exception.h index d102c263..a898043a 100644 --- a/include/cru/base/Exception.h +++ b/include/cru/base/Exception.h @@ -3,6 +3,7 @@ #include <exception> #include <optional> +#include <string_view> namespace cru { #ifdef _MSC_VER @@ -53,16 +54,18 @@ class CRU_BASE_API TextEncodeException : public Exception { class ErrnoException : public Exception { public: + ErrnoException(); + explicit ErrnoException(int error_code); /** * @brief will retrieve errno automatically. */ - explicit ErrnoException(String message = {}); - ErrnoException(String message, int errno_code); - - CRU_DELETE_COPY(ErrnoException) - CRU_DELETE_MOVE(ErrnoException) - - ~ErrnoException() override = default; + 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_; } |