1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #ifndef ESFEM_ERROR_H
26 #define ESFEM_ERROR_H
27
28 #include <stdexcept>
29 #include "dassert.h"
30
31 namespace Esfem{
32 struct Parameter_error : std::runtime_error{
33 explicit Parameter_error(const std::string& msg)
34 : std::runtime_error {"Esfem::Io::Parameter.\n" + msg}
35 {}
36 };
37
38 struct SolutionDriven_error : std::runtime_error{
39 explicit SolutionDriven_error(const std::string& msg)
40 : std::runtime_error
41 {"Esfem::SecOrd_op::Solution_driven.\n" + msg}
42 {}
43 };
44
45 struct BrusselatorScheme_error : std::runtime_error{
46 explicit BrusselatorScheme_error(const std::string& msg)
47 : std::runtime_error
48 {"Esfem::Brusselator_scheme.\n" + msg}
49 {}
50 };
51
52 struct Grid_error : std::runtime_error{
53 explicit Grid_error(const std::string& msg)
54 : std::runtime_error
55 {"Esfem::Grid::Grid_and_time.\n" + msg}
56 {}
57 };
58
59
60 struct Rhs_error : std::runtime_error{
61
62 explicit Rhs_error(const std::string& msg)
63 :std::runtime_error {"Esfem::Rhs.\n" + msg}
64 {}
65 };
66
67 struct InitData_error : std::runtime_error{
68
69 explicit InitData_error(const std::string& msg)
70 :std::runtime_error {"Esfem::InitData.\n" + msg}
71 {}
72 };
73 }
74
75
76
77
78 template<>
79 inline void Assert::dynamic<false, Esfem::Parameter_error>
80 (const bool, const std::string&){};
81 template<>
82 inline void Assert::dynamic<false, Esfem::SolutionDriven_error>
83 (const bool, const std::string&){};
84 template<>
85 inline void Assert::dynamic<false, Esfem::BrusselatorScheme_error>
86 (const bool, const std::string&){};
87 template<>
88 inline void Assert::dynamic<false, Esfem::Grid_error>
89 (const bool, const std::string&){};
90 template<>
91 inline void Assert::dynamic<false, Esfem::Rhs_error>
92 (const bool, const std::string&){};
93 template<>
94 inline void Assert::dynamic<false, Esfem::InitData_error>
95 (const bool, const std::string&){};
96
97 #endif