aboutsummaryrefslogtreecommitdiff
path: root/src/common/ErrnoException.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-15 18:34:55 +0800
committercrupest <crupest@outlook.com>2022-01-15 18:34:55 +0800
commit76b631144e008006efb3894c16e6fd04608d0b68 (patch)
treef676581ac216e910124dd42bd748d9f4a963217a /src/common/ErrnoException.cpp
parentae638fc0c2cad09ae0ab69707852588aedc6e0df (diff)
downloadcru-76b631144e008006efb3894c16e6fd04608d0b68.tar.gz
cru-76b631144e008006efb3894c16e6fd04608d0b68.tar.bz2
cru-76b631144e008006efb3894c16e6fd04608d0b68.zip
...
Diffstat (limited to 'src/common/ErrnoException.cpp')
-rw-r--r--src/common/ErrnoException.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/ErrnoException.cpp b/src/common/ErrnoException.cpp
new file mode 100644
index 00000000..df2349ac
--- /dev/null
+++ b/src/common/ErrnoException.cpp
@@ -0,0 +1,11 @@
+#include "cru/common/ErrnoException.hpp"
+
+#include <errno.h>
+
+namespace cru {
+ErrnoException::ErrnoException(const String& message)
+ : ErrnoException(message, errno) {}
+
+ErrnoException::ErrnoException(const String& message, int errno_code)
+ : Exception(message), errno_code_(errno_code) {}
+} // namespace cru