Debian Codegraph @

cutl/fs/exception.hxx

raw
1 // file : cutl/fs/exception.hxx
2 // copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
3 // license : MIT; see accompanying LICENSE file
4
5 #ifndef CUTL_FS_EXCEPTION_HXX
6 #define CUTL_FS_EXCEPTION_HXX
7
8 #include <cutl/exception.hxx>
9
10 namespace cutl
11 {
12 namespace fs
13 {
14 struct LIBCUTL_EXPORT error: exception
15 {
16 error (int code): code_ (code) {}
17
18 // Error code (errno).
19 //
20 int
21 code () const
22 {
23 return code_;
24 }
25
26 virtual char const*
27 what () const throw ();
28
29 private:
30 int code_;
31 };
32 }
33 }
34
35 #endif // CUTL_FS_EXCEPTION_HXX