summaryrefslogtreecommitdiffabout
path: root/include/opkele/exception.h
authorMichael Krelin <hacker@klever.net>2007-01-11 00:57:06 (UTC)
committer Michael Krelin <hacker@klever.net>2007-01-11 00:57:06 (UTC)
commit06eaf00c48fc563245b85c2be4b8b5a03ef2cfe9 (patch) (unidiff)
treeef978c5d86188d2fc4c7e98a921804d7bfeb5557 /include/opkele/exception.h
parent100199abfdf7a353f9ba2aa9618e0711213290d3 (diff)
downloadlibopkele-06eaf00c48fc563245b85c2be4b8b5a03ef2cfe9.zip
libopkele-06eaf00c48fc563245b85c2be4b8b5a03ef2cfe9.tar.gz
libopkele-06eaf00c48fc563245b85c2be4b8b5a03ef2cfe9.tar.bz2
introduced extension hooks framework
Diffstat (limited to 'include/opkele/exception.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/exception.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/opkele/exception.h b/include/opkele/exception.h
index c5f5811..9fc9bd3 100644
--- a/include/opkele/exception.h
+++ b/include/opkele/exception.h
@@ -144,67 +144,77 @@ namespace opkele {
144 failed_check_authentication(OPKELE_E_PARS) 144 failed_check_authentication(OPKELE_E_PARS)
145 : exception(OPKELE_E_CONS) { } 145 : exception(OPKELE_E_CONS) { }
146 }; 146 };
147 147
148 /** 148 /**
149 * thrown if the id_res request result is negative 149 * thrown if the id_res request result is negative
150 */ 150 */
151 class id_res_failed : public exception { 151 class id_res_failed : public exception {
152 public: 152 public:
153 id_res_failed(OPKELE_E_PARS) 153 id_res_failed(OPKELE_E_PARS)
154 : exception(OPKELE_E_CONS) { } 154 : exception(OPKELE_E_CONS) { }
155 }; 155 };
156 /** 156 /**
157 * thrown if the user_setup_url is provided with negative response 157 * thrown if the user_setup_url is provided with negative response
158 */ 158 */
159 class id_res_setup : public id_res_failed { 159 class id_res_setup : public id_res_failed {
160 public: 160 public:
161 string setup_url; 161 string setup_url;
162 id_res_setup(OPKELE_E_PARS,const string& su) 162 id_res_setup(OPKELE_E_PARS,const string& su)
163 : id_res_failed(OPKELE_E_CONS), setup_url(su) { } 163 : id_res_failed(OPKELE_E_CONS), setup_url(su) { }
164 ~id_res_setup() throw() { } 164 ~id_res_setup() throw() { }
165 }; 165 };
166 /** 166 /**
167 * thrown in case of signature mismatch 167 * thrown in case of signature mismatch
168 */ 168 */
169 class id_res_mismatch : public id_res_failed { 169 class id_res_mismatch : public id_res_failed {
170 public: 170 public:
171 id_res_mismatch(OPKELE_E_PARS) 171 id_res_mismatch(OPKELE_E_PARS)
172 : id_res_failed(OPKELE_E_CONS) { } 172 : id_res_failed(OPKELE_E_CONS) { }
173 }; 173 };
174 174
175 /** 175 /**
176 * openssl malfunction occured 176 * openssl malfunction occured
177 */ 177 */
178 class exception_openssl : public exception { 178 class exception_openssl : public exception {
179 public: 179 public:
180 unsigned long _error; 180 unsigned long _error;
181 string _ssl_string; 181 string _ssl_string;
182 exception_openssl(OPKELE_E_PARS); 182 exception_openssl(OPKELE_E_PARS);
183 ~exception_openssl() throw() { } 183 ~exception_openssl() throw() { }
184 }; 184 };
185 185
186 /** 186 /**
187 * network operation related error occured 187 * network operation related error occured
188 */ 188 */
189 class exception_network : public exception { 189 class exception_network : public exception {
190 public: 190 public:
191 exception_network(OPKELE_E_PARS) 191 exception_network(OPKELE_E_PARS)
192 : exception(OPKELE_E_CONS) { } 192 : exception(OPKELE_E_CONS) { }
193 }; 193 };
194 194
195 /** 195 /**
196 * network operation related error occured, specifically, related to 196 * network operation related error occured, specifically, related to
197 * libcurl 197 * libcurl
198 */ 198 */
199 class exception_curl : public exception_network { 199 class exception_curl : public exception_network {
200 public: 200 public:
201 CURLcode _error; 201 CURLcode _error;
202 string _curl_string; 202 string _curl_string;
203 exception_curl(OPKELE_E_PARS); 203 exception_curl(OPKELE_E_PARS);
204 exception_curl(OPKELE_E_PARS,CURLcode e); 204 exception_curl(OPKELE_E_PARS,CURLcode e);
205 ~exception_curl() throw() { } 205 ~exception_curl() throw() { }
206 }; 206 };
207 207
208 /**
209 * not implemented (think pure virtual) member function executed, signfies
210 * programmer error
211 */
212 class not_implemented : public exception {
213 public:
214 not_implemented(OPKELE_E_PARS)
215 : exception(OPKELE_E_CONS) { }
216 };
217
208} 218}
209 219
210#endif /* __OPKELE_EXCEPTION_H */ 220#endif /* __OPKELE_EXCEPTION_H */