Diffstat (limited to 'include/sitecing/sitecing_exception.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | include/sitecing/sitecing_exception.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/sitecing/sitecing_exception.h b/include/sitecing/sitecing_exception.h index bf475ac..cb5edd9 100644 --- a/include/sitecing/sitecing_exception.h +++ b/include/sitecing/sitecing_exception.h | |||
@@ -1,103 +1,132 @@ | |||
1 | #ifndef __SITECING_SITECING_EXCEPTION_H | 1 | #ifndef __SITECING_SITECING_EXCEPTION_H |
2 | #define __SITECING_SITECING_EXCEPTION_H | 2 | #define __SITECING_SITECING_EXCEPTION_H |
3 | 3 | ||
4 | #include <konforka/exception.h> | 4 | #include <konforka/exception.h> |
5 | 5 | ||
6 | /** | 6 | /** |
7 | * @file | 7 | * @file |
8 | * @brief The site-C-ing specific exception. | 8 | * @brief The site-C-ing specific exception. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | namespace sitecing { | 11 | namespace sitecing { |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * The comonent failed to link. | ||
15 | */ | ||
16 | class link_error : public konforka::exception { | ||
17 | public: | ||
18 | /** | ||
19 | * The component path | ||
20 | */ | ||
21 | string component_path; | ||
22 | |||
23 | /** | ||
24 | * @param w the message. | ||
25 | * @param cp component path. | ||
26 | */ | ||
27 | link_error(const string& w,const string& cp) | ||
28 | : konforka::exception(NOCODEPOINT,w), component_path(cp) { } | ||
29 | /** | ||
30 | * @param fi the file name where the exception is thrown from. | ||
31 | * @param fu the function name where the exception originates from. | ||
32 | * @param l the line number where the exception originates from. | ||
33 | * @param w the message. | ||
34 | * @param cp component path. | ||
35 | */ | ||
36 | link_error(const string& fi,const string& fu,int l,const string& w,const string& cp) | ||
37 | : konforka::exception(fi,fu,l,w), component_path(cp) { } | ||
38 | ~link_error() throw() { } | ||
39 | }; | ||
40 | |||
41 | /** | ||
14 | * The component failed to compile. | 42 | * The component failed to compile. |
15 | */ | 43 | */ |
16 | class compile_error : public konforka::exception { | 44 | class compile_error : public konforka::exception { |
17 | public: | 45 | public: |
18 | /** | 46 | /** |
19 | * The component path | 47 | * The component path |
20 | */ | 48 | */ |
21 | string component_path; | 49 | string component_path; |
22 | 50 | ||
23 | /** | 51 | /** |
24 | * @param w the message. | 52 | * @param w the message. |
25 | * @param cp component path. | 53 | * @param cp component path. |
26 | */ | 54 | */ |
27 | compile_error(const string& w,const string& cp) | 55 | compile_error(const string& w,const string& cp) |
28 | : konforka::exception(NOCODEPOINT,w), component_path(cp) { } | 56 | : konforka::exception(NOCODEPOINT,w), component_path(cp) { } |
29 | /** | 57 | /** |
30 | * @param whe point in code. | 58 | * @param whe point in code. |
31 | * @param wha the message. | 59 | * @param wha the message. |
32 | * @param cp component path. | 60 | * @param cp component path. |
33 | */ | 61 | */ |
34 | compile_error(const string &whe,const string& wha,const string& cp) | 62 | compile_error(const string &whe,const string& wha,const string& cp) |
35 | : konforka::exception(whe,wha), component_path(cp) { } | 63 | : konforka::exception(whe,wha), component_path(cp) { } |
36 | /** | 64 | /** |
37 | * @param fi the file name where the exception is thrown from. | 65 | * @param fi the file name where the exception is thrown from. |
38 | * @param fu the function name where the exception originates from. | 66 | * @param fu the function name where the exception originates from. |
39 | * @param l the line number where the exception originates from. | 67 | * @param l the line number where the exception originates from. |
68 | * @param w the message. | ||
40 | * @param cp component path. | 69 | * @param cp component path. |
41 | */ | 70 | */ |
42 | compile_error(const string &fi,const string& fu,int l,const string& w,const string& cp) | 71 | compile_error(const string &fi,const string& fu,int l,const string& w,const string& cp) |
43 | : konforka::exception(fi,fu,l,w), component_path(cp) { } | 72 | : konforka::exception(fi,fu,l,w), component_path(cp) { } |
44 | ~compile_error() throw() { } | 73 | ~compile_error() throw() { } |
45 | }; | 74 | }; |
46 | 75 | ||
47 | /** | 76 | /** |
48 | * Failed to preprocess component source. | 77 | * Failed to preprocess component source. |
49 | */ | 78 | */ |
50 | class preprocessor_error : public konforka::exception { | 79 | class preprocessor_error : public konforka::exception { |
51 | public: | 80 | public: |
52 | /** | 81 | /** |
53 | * Component name. | 82 | * Component name. |
54 | */ | 83 | */ |
55 | string component_name; | 84 | string component_name; |
56 | /** | 85 | /** |
57 | * The line number of the source code where the error occured. | 86 | * The line number of the source code where the error occured. |
58 | */ | 87 | */ |
59 | int line_number; | 88 | int line_number; |
60 | 89 | ||
61 | /** | 90 | /** |
62 | * @param fi file name where the exception originates from. | 91 | * @param fi file name where the exception originates from. |
63 | * @param fu the function name where the exception originates from. | 92 | * @param fu the function name where the exception originates from. |
64 | * @param l the line number where the exception originate from. | 93 | * @param l the line number where the exception originate from. |
65 | * @param w the error message. | 94 | * @param w the error message. |
66 | * @param cn the component name. | 95 | * @param cn the component name. |
67 | * @param ln the line of the component source where the error occured. | 96 | * @param ln the line of the component source where the error occured. |
68 | */ | 97 | */ |
69 | preprocessor_error(const string& fi,const string& fu,int l,const string& w,const string& cn,int ln) | 98 | preprocessor_error(const string& fi,const string& fu,int l,const string& w,const string& cn,int ln) |
70 | : konforka::exception(fi,fu,l,w), component_name(cn), line_number(ln) { } | 99 | : konforka::exception(fi,fu,l,w), component_name(cn), line_number(ln) { } |
71 | /** | 100 | /** |
72 | * @param fi file name where the exception originates from. | 101 | * @param fi file name where the exception originates from. |
73 | * @param fu the function name where the exception originates from. | 102 | * @param fu the function name where the exception originates from. |
74 | * @param l the line number where the exception originate from. | 103 | * @param l the line number where the exception originate from. |
75 | * @param w the error message. | 104 | * @param w the error message. |
76 | * @param cn the component name. | 105 | * @param cn the component name. |
77 | */ | 106 | */ |
78 | preprocessor_error(const string& fi,const string& fu,int l,const string& w,const string& cn) | 107 | preprocessor_error(const string& fi,const string& fu,int l,const string& w,const string& cn) |
79 | : konforka::exception(fi,fu,l,w), component_name(cn), line_number(-1) { } | 108 | : konforka::exception(fi,fu,l,w), component_name(cn), line_number(-1) { } |
80 | /** | 109 | /** |
81 | * @param fi file name where the exception originates from. | 110 | * @param fi file name where the exception originates from. |
82 | * @param fu the function name where the exception originates from. | 111 | * @param fu the function name where the exception originates from. |
83 | * @param l the line number where the exception originate from. | 112 | * @param l the line number where the exception originate from. |
84 | * @param w the error message. | 113 | * @param w the error message. |
85 | * @param ln the line of the component source where the error occured. | 114 | * @param ln the line of the component source where the error occured. |
86 | */ | 115 | */ |
87 | preprocessor_error(const string& fi,const string& fu,int l,const string& w,int ln) | 116 | preprocessor_error(const string& fi,const string& fu,int l,const string& w,int ln) |
88 | : konforka::exception(fi,fu,l,w), line_number(ln) { } | 117 | : konforka::exception(fi,fu,l,w), line_number(ln) { } |
89 | /** | 118 | /** |
90 | * @param fi file name where the exception originates from. | 119 | * @param fi file name where the exception originates from. |
91 | * @param fu the function name where the exception originates from. | 120 | * @param fu the function name where the exception originates from. |
92 | * @param l the line number where the exception originate from. | 121 | * @param l the line number where the exception originate from. |
93 | * @param w the error message. | 122 | * @param w the error message. |
94 | */ | 123 | */ |
95 | preprocessor_error(const string& fi,const string& fu,int l,const string& w) | 124 | preprocessor_error(const string& fi,const string& fu,int l,const string& w) |
96 | : konforka::exception(fi,fu,l,w), line_number(-1) { } | 125 | : konforka::exception(fi,fu,l,w), line_number(-1) { } |
97 | 126 | ||
98 | ~preprocessor_error() throw() {} | 127 | ~preprocessor_error() throw() {} |
99 | }; | 128 | }; |
100 | 129 | ||
101 | } | 130 | } |
102 | 131 | ||
103 | #endif /* __SITECING_SITECING_EXCEPTION_H */ | 132 | #endif /* __SITECING_SITECING_EXCEPTION_H */ |