Lhaz
except.hpp
[詳解]
1 #ifndef DIRDIFF_EXCEPT_HPP_INCLUDED
2 #define DIRDIFF_EXCEPT_HPP_INCLUDED
3 
4 #include <stdexcept>
5 #include <string>
6 
7 
8 #define DIRDIFF_DEFINE_EXCEPT(classname) ¥
9  struct classname : std::runtime_error { ¥
10  classname(const std::string& msg): ¥
11  std::runtime_error(msg){ ¥
12  } ¥
13  };
14 
15 
16 namespace dirdiff {
17 
18 
19 DIRDIFF_DEFINE_EXCEPT(internal_error);
20 
21 DIRDIFF_DEFINE_EXCEPT(argument_error);
22 
23 DIRDIFF_DEFINE_EXCEPT(operation_error);
24 
25 DIRDIFF_DEFINE_EXCEPT(other_error);
26 
27 
28 } // namespace dirdiff
29 
30 
31 #undef DIRDIFF_DEFINE_EXCEPT
32 
33 
34 #endif // DIRDIFF_EXCEPT_HPP_INCLUDED
¥ classname(const std::string &msg)
Definition: except.hpp:10
Definition: except.hpp:16
#define DIRDIFF_DEFINE_EXCEPT(classname)
Definition: except.hpp:8
Definition: except.hpp:9
Definition: WinUnit.h:350