aboutsummaryrefslogtreecommitdiff
path: root/libcutl/fs/exception.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-12-16 20:29:05 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-02-24 16:40:04 +0300
commit8e761289a2446367267c6c0d9a26e734f0f78306 (patch)
treefb495d8c18801f271d124ee48731f10df396ca89 /libcutl/fs/exception.hxx
parent4c8104756b92b9fa16b3a725e8a6aa620dfd606e (diff)
Get rid of legacy build systems and rename cutl/ to libcutl/
Diffstat (limited to 'libcutl/fs/exception.hxx')
-rw-r--r--libcutl/fs/exception.hxx36
1 files changed, 36 insertions, 0 deletions
diff --git a/libcutl/fs/exception.hxx b/libcutl/fs/exception.hxx
new file mode 100644
index 0000000..511d86f
--- /dev/null
+++ b/libcutl/fs/exception.hxx
@@ -0,0 +1,36 @@
+// file : libcutl/fs/exception.hxx
+// license : MIT; see accompanying LICENSE file
+
+#ifndef LIBCUTL_FS_EXCEPTION_HXX
+#define LIBCUTL_FS_EXCEPTION_HXX
+
+#include <libcutl/exception.hxx>
+
+#include <libcutl/export.hxx>
+
+namespace cutl
+{
+ namespace fs
+ {
+ struct LIBCUTL_EXPORT error: exception
+ {
+ error (int code): code_ (code) {}
+
+ // Error code (errno).
+ //
+ int
+ code () const
+ {
+ return code_;
+ }
+
+ virtual char const*
+ what () const noexcept;
+
+ private:
+ int code_;
+ };
+ }
+}
+
+#endif // LIBCUTL_FS_EXCEPTION_HXX