diff options
Diffstat (limited to 'include/cru/common/Exception.h')
-rw-r--r-- | include/cru/common/Exception.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/cru/common/Exception.h b/include/cru/common/Exception.h index 06a10030..0aee871c 100644 --- a/include/cru/common/Exception.h +++ b/include/cru/common/Exception.h @@ -9,8 +9,7 @@ namespace cru { #endif class CRU_BASE_API Exception : public std::exception { public: - Exception(); - explicit Exception(String message); + explicit Exception(String message = {}); CRU_DEFAULT_COPY(Exception) CRU_DEFAULT_MOVE(Exception) @@ -40,9 +39,11 @@ class CRU_BASE_API TextEncodeException : public Exception { class ErrnoException : public Exception { public: - ErrnoException() : ErrnoException(String{}) {} - explicit ErrnoException(const String& message); - ErrnoException(const String& message, int errno_code); + /** + * @brief will retrieve errno automatically. + */ + explicit ErrnoException(String message = {}); + ErrnoException(String message, int errno_code); CRU_DELETE_COPY(ErrnoException) CRU_DELETE_MOVE(ErrnoException) |