Rev 1945 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1945 | Rev 1947 | ||
|---|---|---|---|
| Line 29... | Line 29... | ||
| 29 | 29 | ||
| 30 | namespace atom { |
30 | namespace atom { |
| 31 | namespace exception { |
31 | namespace exception { |
| 32 | 32 | ||
| 33 | #define CREATE_EXCEPTION(name, string) \ |
33 | #define CREATE_EXCEPTION(name, string) \ |
| 34 | class |
34 | class name : public std::exception \ |
| 35 | { \ |
35 | { \ |
| 36 | virtual const char* what() const throw() \ |
36 | virtual const char* what() const throw() \ |
| 37 | { \ |
37 | { \ |
| 38 | return |
38 | return string; \ |
| 39 | } \ |
39 | } \ |
| 40 | } |
40 | }; |
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | CREATE_EXCEPTION(invalid_in_param, "Inparameter failure"); |
43 | CREATE_EXCEPTION(invalid_in_param, "Inparameter failure"); |
| 44 | CREATE_EXCEPTION(missing_in_param, "Missing inparameters"); |
44 | CREATE_EXCEPTION(missing_in_param, "Missing inparameters"); |
| 45 | CREATE_EXCEPTION(connect_failed, "Connection failed"); |
45 | CREATE_EXCEPTION(connect_failed, "Connection failed"); |
| 46 | CREATE_EXCEPTION(initialization_failed, "Initialization failed"); |
46 | CREATE_EXCEPTION(initialization_failed, "Initialization failed"); |
| 47 | CREATE_EXCEPTION(missing_resource, "Missing resource"); |
47 | CREATE_EXCEPTION(missing_resource, "Missing resource"); |
| 48 | CREATE_EXCEPTION(action_failed, "Action failed"); |
48 | CREATE_EXCEPTION(action_failed, "Action failed"); |
| - | 49 | CREATE_EXCEPTION(unknown_state, "Unrecognized state"); |
|
| 49 | 50 | ||
| 50 | 51 | ||
| 51 | }; // namespace exception |
52 | }; // namespace exception |
| 52 | }; // namespace atom |
53 | }; // namespace atom |
| 53 | 54 | ||