summaryrefslogtreecommitdiffabout
path: root/include/sitecing/exception.h
authorMichael Krelin <hacker@klever.net>2007-03-04 01:14:24 (UTC)
committer Michael Krelin <hacker@klever.net>2007-03-04 01:14:24 (UTC)
commitd0540221d96199532046182649610c8d42252be1 (patch) (unidiff)
tree35faaf1074f5718702539518ee8dd3f09098bc41 /include/sitecing/exception.h
parent8677376c6669ad29bf24e237f626fd8296558f9b (diff)
downloadsitecing-d0540221d96199532046182649610c8d42252be1.zip
sitecing-d0540221d96199532046182649610c8d42252be1.tar.gz
sitecing-d0540221d96199532046182649610c8d42252be1.tar.bz2
doxygen update
Diffstat (limited to 'include/sitecing/exception.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/sitecing/exception.h275
1 files changed, 275 insertions, 0 deletions
diff --git a/include/sitecing/exception.h b/include/sitecing/exception.h
index 985fc6d..857a8e6 100644
--- a/include/sitecing/exception.h
+++ b/include/sitecing/exception.h
@@ -1,542 +1,817 @@
1#ifndef __SITECING_EXCEPTION_H 1#ifndef __SITECING_EXCEPTION_H
2#define __SITECING_EXCEPTION_H 2#define __SITECING_EXCEPTION_H
3 3
4/** 4/**
5 * @file 5 * @file
6 * @brief The site-C-ing specific exceptions. 6 * @brief The site-C-ing specific exceptions.
7 */ 7 */
8 8
9/** 9/**
10 * @brief The main site-C-ing namespace. 10 * @brief The main site-C-ing namespace.
11 */ 11 */
12namespace sitecing { 12namespace sitecing {
13 13
14 // TODO: status specifics 14 // TODO: status specifics
15 15
16 /** 16 /**
17 * The http status to return. 17 * The http status to return.
18 */ 18 */
19 class http_status { 19 class http_status {
20 public: 20 public:
21 /** 21 /**
22 * The status string. 22 * The status string.
23 */ 23 */
24 string status; 24 string status;
25 /** 25 /**
26 * The message to follow the status string. 26 * The message to follow the status string.
27 */ 27 */
28 string message; 28 string message;
29 29
30 /** 30 /**
31 * @param s HTTP status. 31 * @param s HTTP status.
32 * @param m HTTP status message. 32 * @param m HTTP status message.
33 */ 33 */
34 http_status(const string& s,const string& m) 34 http_status(const string& s,const string& m)
35 : status(s), message(m) { } 35 : status(s), message(m) { }
36 virtual ~http_status() throw() { } 36 virtual ~http_status() throw() { }
37 }; 37 };
38 38
39 // per RFC 2616 39 // per RFC 2616
40 40
41 /** 41 /**
42 * Informational. 42 * Informational.
43 */ 43 */
44 class http_status_1xx : public http_status { 44 class http_status_1xx : public http_status {
45 public: 45 public:
46 /**
47 * @param s HTTP status
48 * @param m HTTP status message
49 */
46 explicit http_status_1xx(const string &s,const string& m) 50 explicit http_status_1xx(const string &s,const string& m)
47 : http_status(s,m) { } 51 : http_status(s,m) { }
48 }; 52 };
49 /** 53 /**
50 * Continue. 54 * Continue.
51 */ 55 */
52 class http_status_100 : public http_status_1xx { 56 class http_status_100 : public http_status_1xx {
53 public: 57 public:
58 /**
59 * @param m HTTP status message
60 */
54 explicit http_status_100(const string& m) 61 explicit http_status_100(const string& m)
55 : http_status_1xx("100",m) { } 62 : http_status_1xx("100",m) { }
56 explicit http_status_100() 63 explicit http_status_100()
57 : http_status_1xx("100","Continue") { } 64 : http_status_1xx("100","Continue") { }
58 }; 65 };
59 /** 66 /**
60 * Switching protocols. 67 * Switching protocols.
61 */ 68 */
62 class http_status_101 : public http_status_1xx { 69 class http_status_101 : public http_status_1xx {
63 public: 70 public:
71 /**
72 * @param m HTTP status message
73 */
64 explicit http_status_101(const string& m) 74 explicit http_status_101(const string& m)
65 : http_status_1xx("101",m) { } 75 : http_status_1xx("101",m) { }
66 explicit http_status_101() 76 explicit http_status_101()
67 : http_status_1xx("101","Switching protocols") { } 77 : http_status_1xx("101","Switching protocols") { }
68 }; 78 };
69 79
70 /** 80 /**
71 * Successful. 81 * Successful.
72 */ 82 */
73 class http_status_2xx : public http_status { 83 class http_status_2xx : public http_status {
74 public: 84 public:
85 /**
86 * @param s HTTP status message
87 * @param m HTTP status message
88 */
75 explicit http_status_2xx(const string& s,const string& m) 89 explicit http_status_2xx(const string& s,const string& m)
76 : http_status(s,m) { } 90 : http_status(s,m) { }
77 }; 91 };
78 /** 92 /**
79 * OK. 93 * OK.
80 */ 94 */
81 class http_status_200 : public http_status_2xx { 95 class http_status_200 : public http_status_2xx {
82 public: 96 public:
97 /**
98 * @param m HTTP status message
99 */
83 explicit http_status_200(const string& m) 100 explicit http_status_200(const string& m)
84 : http_status_2xx("200",m) { } 101 : http_status_2xx("200",m) { }
85 explicit http_status_200() 102 explicit http_status_200()
86 : http_status_2xx("200","OK") { } 103 : http_status_2xx("200","OK") { }
87 }; 104 };
88 /** 105 /**
89 * Created. 106 * Created.
90 */ 107 */
91 class http_status_201 : public http_status_2xx { 108 class http_status_201 : public http_status_2xx {
92 public: 109 public:
110 /**
111 * @param m HTTP status message
112 */
93 explicit http_status_201(const string& m) 113 explicit http_status_201(const string& m)
94 : http_status_2xx("201",m) { } 114 : http_status_2xx("201",m) { }
95 explicit http_status_201() 115 explicit http_status_201()
96 : http_status_2xx("201","Created") { } 116 : http_status_2xx("201","Created") { }
97 }; 117 };
98 /** 118 /**
99 * Accepted. 119 * Accepted.
100 */ 120 */
101 class http_status_202 : public http_status_2xx { 121 class http_status_202 : public http_status_2xx {
102 public: 122 public:
123 /**
124 * @param m HTTP status message
125 */
103 explicit http_status_202(const string& m) 126 explicit http_status_202(const string& m)
104 : http_status_2xx("202",m) { } 127 : http_status_2xx("202",m) { }
105 explicit http_status_202() 128 explicit http_status_202()
106 : http_status_2xx("202","Accepted") { } 129 : http_status_2xx("202","Accepted") { }
107 }; 130 };
108 /** 131 /**
109 * Non-authoritative infortmation. 132 * Non-authoritative infortmation.
110 */ 133 */
111 class http_status_203 : public http_status_2xx { 134 class http_status_203 : public http_status_2xx {
112 public: 135 public:
136 /**
137 * @param m HTTP status message
138 */
113 explicit http_status_203(const string& m) 139 explicit http_status_203(const string& m)
114 : http_status_2xx("203",m) { } 140 : http_status_2xx("203",m) { }
115 explicit http_status_203() 141 explicit http_status_203()
116 : http_status_2xx("203","Non-authoritative information") { } 142 : http_status_2xx("203","Non-authoritative information") { }
117 }; 143 };
118 /** 144 /**
119 * No content. 145 * No content.
120 */ 146 */
121 class http_status_204 : public http_status_2xx { 147 class http_status_204 : public http_status_2xx {
122 public: 148 public:
149 /**
150 * @param m HTTP status message
151 */
123 explicit http_status_204(const string& m) 152 explicit http_status_204(const string& m)
124 : http_status_2xx("204",m) { } 153 : http_status_2xx("204",m) { }
125 explicit http_status_204() 154 explicit http_status_204()
126 : http_status_2xx("204","No content") { } 155 : http_status_2xx("204","No content") { }
127 }; 156 };
128 /** 157 /**
129 * Reset content. 158 * Reset content.
130 */ 159 */
131 class http_status_205 : public http_status_2xx { 160 class http_status_205 : public http_status_2xx {
132 public: 161 public:
162 /**
163 * @param m HTTP status message
164 */
133 explicit http_status_205(const string& m) 165 explicit http_status_205(const string& m)
134 : http_status_2xx("205",m) { } 166 : http_status_2xx("205",m) { }
135 explicit http_status_205() 167 explicit http_status_205()
136 : http_status_2xx("205","Reset content") { } 168 : http_status_2xx("205","Reset content") { }
137 }; 169 };
138 /** 170 /**
139 * Partial content. 171 * Partial content.
140 */ 172 */
141 class http_status_206 : public http_status_2xx { 173 class http_status_206 : public http_status_2xx {
142 public: 174 public:
175 /**
176 * @param m HTTP status message
177 */
143 explicit http_status_206(const string& m) 178 explicit http_status_206(const string& m)
144 : http_status_2xx("206",m) { } 179 : http_status_2xx("206",m) { }
145 explicit http_status_206() 180 explicit http_status_206()
146 : http_status_2xx("206","Partial content") { } 181 : http_status_2xx("206","Partial content") { }
147 }; 182 };
148 183
149 /** 184 /**
150 * Redirection. 185 * Redirection.
151 */ 186 */
152 class http_status_3xx : public http_status { 187 class http_status_3xx : public http_status {
153 public: 188 public:
189 /**
190 * @param s HTTP status
191 * @param m HTTP status message
192 */
154 explicit http_status_3xx(const string& s,const string& m) 193 explicit http_status_3xx(const string& s,const string& m)
155 : http_status(s,m) { } 194 : http_status(s,m) { }
156 }; 195 };
157 /** 196 /**
158 * Multiple choices. 197 * Multiple choices.
159 */ 198 */
160 class http_status_300 : public http_status_3xx { 199 class http_status_300 : public http_status_3xx {
161 public: 200 public:
201 /**
202 * @param m HTTP status message
203 */
162 explicit http_status_300(const string& m) 204 explicit http_status_300(const string& m)
163 : http_status_3xx("300",m) { } 205 : http_status_3xx("300",m) { }
164 explicit http_status_300() 206 explicit http_status_300()
165 : http_status_3xx("300","Multiple choices") { } 207 : http_status_3xx("300","Multiple choices") { }
166 }; 208 };
167 /** 209 /**
168 * Moved permanently. 210 * Moved permanently.
169 */ 211 */
170 class http_status_301 : public http_status_3xx { 212 class http_status_301 : public http_status_3xx {
171 public: 213 public:
214 /**
215 * @param m HTTP status message
216 */
172 explicit http_status_301(const string& m) 217 explicit http_status_301(const string& m)
173 : http_status_3xx("301",m) { } 218 : http_status_3xx("301",m) { }
174 explicit http_status_301() 219 explicit http_status_301()
175 : http_status_3xx("301","Moved permanently") { } 220 : http_status_3xx("301","Moved permanently") { }
176 }; 221 };
177 /** 222 /**
178 * Found. 223 * Found.
179 */ 224 */
180 class http_status_302 : public http_status_3xx { 225 class http_status_302 : public http_status_3xx {
181 public: 226 public:
227 /**
228 * @param m HTTP status message
229 */
182 explicit http_status_302(const string& m) 230 explicit http_status_302(const string& m)
183 : http_status_3xx("302",m) { } 231 : http_status_3xx("302",m) { }
184 explicit http_status_302() 232 explicit http_status_302()
185 : http_status_3xx("302","Found") { } 233 : http_status_3xx("302","Found") { }
186 }; 234 };
187 /** 235 /**
188 * See other. 236 * See other.
189 */ 237 */
190 class http_status_303 : public http_status_3xx { 238 class http_status_303 : public http_status_3xx {
191 public: 239 public:
240 /**
241 * @param m HTTP status message
242 */
192 explicit http_status_303(const string& m) 243 explicit http_status_303(const string& m)
193 : http_status_3xx("303",m) { } 244 : http_status_3xx("303",m) { }
194 explicit http_status_303() 245 explicit http_status_303()
195 : http_status_3xx("303","See other") { } 246 : http_status_3xx("303","See other") { }
196 }; 247 };
197 /** 248 /**
198 * Not modified. 249 * Not modified.
199 */ 250 */
200 class http_status_304 : public http_status_3xx { 251 class http_status_304 : public http_status_3xx {
201 public: 252 public:
253 /**
254 * @param m HTTP status message
255 */
202 explicit http_status_304(const string& m) 256 explicit http_status_304(const string& m)
203 : http_status_3xx("304",m) { } 257 : http_status_3xx("304",m) { }
204 explicit http_status_304() 258 explicit http_status_304()
205 : http_status_3xx("304","Not modified") { } 259 : http_status_3xx("304","Not modified") { }
206 }; 260 };
207 /** 261 /**
208 * Use proxy. 262 * Use proxy.
209 */ 263 */
210 class http_status_305 : public http_status_3xx { 264 class http_status_305 : public http_status_3xx {
211 public: 265 public:
266 /**
267 * @param m HTTP status message
268 */
212 explicit http_status_305(const string& m) 269 explicit http_status_305(const string& m)
213 : http_status_3xx("305",m) { } 270 : http_status_3xx("305",m) { }
214 explicit http_status_305() 271 explicit http_status_305()
215 : http_status_3xx("305","Use proxy") { } 272 : http_status_3xx("305","Use proxy") { }
216 }; 273 };
217 // 306 is unused and reserved 274 // 306 is unused and reserved
218 /** 275 /**
219 * Temporary redirect. 276 * Temporary redirect.
220 */ 277 */
221 class http_status_307 : public http_status_3xx { 278 class http_status_307 : public http_status_3xx {
222 public: 279 public:
280 /**
281 * @param m HTTP status message
282 */
223 explicit http_status_307(const string& m) 283 explicit http_status_307(const string& m)
224 : http_status_3xx("307",m) { } 284 : http_status_3xx("307",m) { }
225 explicit http_status_307() 285 explicit http_status_307()
226 : http_status_3xx("307","Temporary redirect") { } 286 : http_status_3xx("307","Temporary redirect") { }
227 }; 287 };
228 288
229 /** 289 /**
230 * Error. 290 * Error.
231 */ 291 */
232 class http_status_4xx : public http_status { 292 class http_status_4xx : public http_status {
233 public: 293 public:
294 /**
295 * @param s HTTP status
296 * @param m HTTP status message
297 */
234 explicit http_status_4xx(const string& s,const string& m) 298 explicit http_status_4xx(const string& s,const string& m)
235 : http_status(s,m) { } 299 : http_status(s,m) { }
236 }; 300 };
237 /** 301 /**
238 * Bad request. 302 * Bad request.
239 */ 303 */
240 class http_status_400 : public http_status_4xx { 304 class http_status_400 : public http_status_4xx {
241 public: 305 public:
306 /**
307 * @param m HTTP status message
308 */
242 explicit http_status_400(const string& m) 309 explicit http_status_400(const string& m)
243 : http_status_4xx("400",m) { } 310 : http_status_4xx("400",m) { }
244 explicit http_status_400() 311 explicit http_status_400()
245 : http_status_4xx("400","Bad request") { } 312 : http_status_4xx("400","Bad request") { }
246 }; 313 };
247 /** 314 /**
248 * Unauthorized. 315 * Unauthorized.
249 */ 316 */
250 class http_status_401 : public http_status_4xx { 317 class http_status_401 : public http_status_4xx {
251 public: 318 public:
319 /**
320 * @param m HTTP status message
321 */
252 explicit http_status_401(const string& m) 322 explicit http_status_401(const string& m)
253 : http_status_4xx("401",m) { } 323 : http_status_4xx("401",m) { }
254 explicit http_status_401() 324 explicit http_status_401()
255 : http_status_4xx("401","Unauthorized") { } 325 : http_status_4xx("401","Unauthorized") { }
256 }; 326 };
257 /** 327 /**
258 * Payment required. 328 * Payment required.
259 */ 329 */
260 class http_status_402 : public http_status_4xx { 330 class http_status_402 : public http_status_4xx {
261 public: 331 public:
332 /**
333 * @param m HTTP status message
334 */
262 explicit http_status_402(const string& m) 335 explicit http_status_402(const string& m)
263 : http_status_4xx("402",m) { } 336 : http_status_4xx("402",m) { }
264 explicit http_status_402() 337 explicit http_status_402()
265 : http_status_4xx("402","Payment required") { } 338 : http_status_4xx("402","Payment required") { }
266 }; 339 };
267 /** 340 /**
268 * Forbidden. 341 * Forbidden.
269 */ 342 */
270 class http_status_403 : public http_status_4xx { 343 class http_status_403 : public http_status_4xx {
271 public: 344 public:
345 /**
346 * @param m HTTP status message
347 */
272 explicit http_status_403(const string& m) 348 explicit http_status_403(const string& m)
273 : http_status_4xx("403",m) { } 349 : http_status_4xx("403",m) { }
274 explicit http_status_403() 350 explicit http_status_403()
275 : http_status_4xx("403","Forbidden") { } 351 : http_status_4xx("403","Forbidden") { }
276 }; 352 };
277 /** 353 /**
278 * Not found. 354 * Not found.
279 */ 355 */
280 class http_status_404 : public http_status_4xx { 356 class http_status_404 : public http_status_4xx {
281 public: 357 public:
358 /**
359 * @param m HTTP status message
360 */
282 explicit http_status_404(const string& m) 361 explicit http_status_404(const string& m)
283 : http_status_4xx("404",m) { } 362 : http_status_4xx("404",m) { }
284 explicit http_status_404() 363 explicit http_status_404()
285 : http_status_4xx("404","Not found") { } 364 : http_status_4xx("404","Not found") { }
286 }; 365 };
287 /** 366 /**
288 * Method not allowed. 367 * Method not allowed.
289 */ 368 */
290 class http_status_405 : public http_status_4xx { 369 class http_status_405 : public http_status_4xx {
291 public: 370 public:
371 /**
372 * @param m HTTP status message
373 */
292 explicit http_status_405(const string& m) 374 explicit http_status_405(const string& m)
293 : http_status_4xx("405",m) { } 375 : http_status_4xx("405",m) { }
294 explicit http_status_405() 376 explicit http_status_405()
295 : http_status_4xx("405","Method not allowed") { } 377 : http_status_4xx("405","Method not allowed") { }
296 }; 378 };
297 /** 379 /**
298 * Not acceptable. 380 * Not acceptable.
299 */ 381 */
300 class http_status_406 : public http_status_4xx { 382 class http_status_406 : public http_status_4xx {
301 public: 383 public:
384 /**
385 * @param m HTTP status message
386 */
302 explicit http_status_406(const string& m) 387 explicit http_status_406(const string& m)
303 : http_status_4xx("406",m) { } 388 : http_status_4xx("406",m) { }
304 explicit http_status_406() 389 explicit http_status_406()
305 : http_status_4xx("406","Not acceptable") { } 390 : http_status_4xx("406","Not acceptable") { }
306 }; 391 };
307 /** 392 /**
308 * Proxy authentication required. 393 * Proxy authentication required.
309 */ 394 */
310 class http_status_407 : public http_status_4xx { 395 class http_status_407 : public http_status_4xx {
311 public: 396 public:
397 /**
398 * @param m HTTP status message
399 */
312 explicit http_status_407(const string& m) 400 explicit http_status_407(const string& m)
313 : http_status_4xx("407",m) { } 401 : http_status_4xx("407",m) { }
314 explicit http_status_407() 402 explicit http_status_407()
315 : http_status_4xx("407","Proxy authentication required") { } 403 : http_status_4xx("407","Proxy authentication required") { }
316 }; 404 };
317 /** 405 /**
318 * Request timeout. 406 * Request timeout.
319 */ 407 */
320 class http_status_408 : public http_status_4xx { 408 class http_status_408 : public http_status_4xx {
321 public: 409 public:
410 /**
411 * @param m HTTP status message
412 */
322 explicit http_status_408(const string& m) 413 explicit http_status_408(const string& m)
323 : http_status_4xx("408",m) { } 414 : http_status_4xx("408",m) { }
324 explicit http_status_408() 415 explicit http_status_408()
325 : http_status_4xx("408","Request timeout") { } 416 : http_status_4xx("408","Request timeout") { }
326 }; 417 };
327 /** 418 /**
328 * Conflict. 419 * Conflict.
329 */ 420 */
330 class http_status_409 : public http_status_4xx { 421 class http_status_409 : public http_status_4xx {
331 public: 422 public:
423 /**
424 * @param m HTTP status message
425 */
332 explicit http_status_409(const string& m) 426 explicit http_status_409(const string& m)
333 : http_status_4xx("409",m) { } 427 : http_status_4xx("409",m) { }
334 explicit http_status_409() 428 explicit http_status_409()
335 : http_status_4xx("409","Conflict") { } 429 : http_status_4xx("409","Conflict") { }
336 }; 430 };
337 /** 431 /**
338 * Gone. 432 * Gone.
339 */ 433 */
340 class http_status_410 : public http_status_4xx { 434 class http_status_410 : public http_status_4xx {
341 public: 435 public:
436 /**
437 * @param m HTTP status message
438 */
342 explicit http_status_410(const string& m) 439 explicit http_status_410(const string& m)
343 : http_status_4xx("410",m) { } 440 : http_status_4xx("410",m) { }
344 explicit http_status_410() 441 explicit http_status_410()
345 : http_status_4xx("410","Gone") { } 442 : http_status_4xx("410","Gone") { }
346 }; 443 };
347 /** 444 /**
348 * Length required. 445 * Length required.
349 */ 446 */
350 class http_status_411 : public http_status_4xx { 447 class http_status_411 : public http_status_4xx {
351 public: 448 public:
449 /**
450 * @param m HTTP status message
451 */
352 explicit http_status_411(const string& m) 452 explicit http_status_411(const string& m)
353 : http_status_4xx("411",m) { } 453 : http_status_4xx("411",m) { }
354 explicit http_status_411() 454 explicit http_status_411()
355 : http_status_4xx("411","Length required") { } 455 : http_status_4xx("411","Length required") { }
356 }; 456 };
357 /** 457 /**
358 * Precondition failed. 458 * Precondition failed.
359 */ 459 */
360 class http_status_412 : public http_status_4xx { 460 class http_status_412 : public http_status_4xx {
361 public: 461 public:
462 /**
463 * @param m HTTP status message
464 */
362 explicit http_status_412(const string& m) 465 explicit http_status_412(const string& m)
363 : http_status_4xx("412",m) { } 466 : http_status_4xx("412",m) { }
364 explicit http_status_412() 467 explicit http_status_412()
365 : http_status_4xx("412","Precondition failed") { } 468 : http_status_4xx("412","Precondition failed") { }
366 }; 469 };
367 /** 470 /**
368 * Request entity too large. 471 * Request entity too large.
369 */ 472 */
370 class http_status_413 : public http_status_4xx { 473 class http_status_413 : public http_status_4xx {
371 public: 474 public:
475 /**
476 * @param m HTTP status message
477 */
372 explicit http_status_413(const string& m) 478 explicit http_status_413(const string& m)
373 : http_status_4xx("413",m) { } 479 : http_status_4xx("413",m) { }
374 explicit http_status_413() 480 explicit http_status_413()
375 : http_status_4xx("413","Request entity too large") { } 481 : http_status_4xx("413","Request entity too large") { }
376 }; 482 };
377 /** 483 /**
378 * Request URI too long. 484 * Request URI too long.
379 */ 485 */
380 class http_status_414 : public http_status_4xx { 486 class http_status_414 : public http_status_4xx {
381 public: 487 public:
488 /**
489 * @param m HTTP status message
490 */
382 explicit http_status_414(const string& m) 491 explicit http_status_414(const string& m)
383 : http_status_4xx("414",m) { } 492 : http_status_4xx("414",m) { }
384 explicit http_status_414() 493 explicit http_status_414()
385 : http_status_4xx("414","Request URI too long") { } 494 : http_status_4xx("414","Request URI too long") { }
386 }; 495 };
387 /** 496 /**
388 * Unsupported media type. 497 * Unsupported media type.
389 */ 498 */
390 class http_status_415 : public http_status_4xx { 499 class http_status_415 : public http_status_4xx {
391 public: 500 public:
501 /**
502 * @param m HTTP status message
503 */
392 explicit http_status_415(const string& m) 504 explicit http_status_415(const string& m)
393 : http_status_4xx("415",m) { } 505 : http_status_4xx("415",m) { }
394 explicit http_status_415() 506 explicit http_status_415()
395 : http_status_4xx("415","Unsupported media type") { } 507 : http_status_4xx("415","Unsupported media type") { }
396 }; 508 };
397 /** 509 /**
398 * Requested range not satisfiable. 510 * Requested range not satisfiable.
399 */ 511 */
400 class http_status_416 : public http_status_4xx { 512 class http_status_416 : public http_status_4xx {
401 public: 513 public:
514 /**
515 * @param m HTTP status message
516 */
402 explicit http_status_416(const string& m) 517 explicit http_status_416(const string& m)
403 : http_status_4xx("416",m) { } 518 : http_status_4xx("416",m) { }
404 explicit http_status_416() 519 explicit http_status_416()
405 : http_status_4xx("416","Requested range not satisfiable") { } 520 : http_status_4xx("416","Requested range not satisfiable") { }
406 }; 521 };
407 /** 522 /**
408 * Expectation failed. 523 * Expectation failed.
409 */ 524 */
410 class http_status_417 : public http_status_4xx { 525 class http_status_417 : public http_status_4xx {
411 public: 526 public:
527 /**
528 * @param m HTTP status message
529 */
412 explicit http_status_417(const string& m) 530 explicit http_status_417(const string& m)
413 : http_status_4xx("417",m) { } 531 : http_status_4xx("417",m) { }
414 explicit http_status_417() 532 explicit http_status_417()
415 : http_status_4xx("417","Expectation failed") { } 533 : http_status_4xx("417","Expectation failed") { }
416 }; 534 };
417 535
418 /** 536 /**
419 * Server error. 537 * Server error.
420 */ 538 */
421 class http_status_5xx : public http_status { 539 class http_status_5xx : public http_status {
422 public: 540 public:
541 /**
542 * @param s HTTP status
543 * @param m HTTP status message
544 */
423 explicit http_status_5xx(const string& s,const string& m) 545 explicit http_status_5xx(const string& s,const string& m)
424 : http_status(s,m) { } 546 : http_status(s,m) { }
425 }; 547 };
426 /** 548 /**
427 * Internal server error. 549 * Internal server error.
428 */ 550 */
429 class http_status_500 : public http_status_5xx { 551 class http_status_500 : public http_status_5xx {
430 public: 552 public:
553 /**
554 * @param m HTTP status message
555 */
431 explicit http_status_500(const string& m) 556 explicit http_status_500(const string& m)
432 : http_status_5xx("500",m) { } 557 : http_status_5xx("500",m) { }
433 explicit http_status_500() 558 explicit http_status_500()
434 : http_status_5xx("500","Internal server error") { } 559 : http_status_5xx("500","Internal server error") { }
435 }; 560 };
436 /** 561 /**
437 * Not implemented. 562 * Not implemented.
438 */ 563 */
439 class http_status_501 : public http_status_5xx { 564 class http_status_501 : public http_status_5xx {
440 public: 565 public:
566 /**
567 * @param m HTTP status message
568 */
441 explicit http_status_501(const string& m) 569 explicit http_status_501(const string& m)
442 : http_status_5xx("501",m) { } 570 : http_status_5xx("501",m) { }
443 explicit http_status_501() 571 explicit http_status_501()
444 : http_status_5xx("501","Not implemented") { } 572 : http_status_5xx("501","Not implemented") { }
445 }; 573 };
446 /** 574 /**
447 * Bad gateway. 575 * Bad gateway.
448 */ 576 */
449 class http_status_502 : public http_status_5xx { 577 class http_status_502 : public http_status_5xx {
450 public: 578 public:
579 /**
580 * @param m HTTP status message
581 */
451 explicit http_status_502(const string& m) 582 explicit http_status_502(const string& m)
452 : http_status_5xx("502",m) { } 583 : http_status_5xx("502",m) { }
453 explicit http_status_502() 584 explicit http_status_502()
454 : http_status_5xx("502","Bad gateway") { } 585 : http_status_5xx("502","Bad gateway") { }
455 }; 586 };
456 /** 587 /**
457 * Service unavailable. 588 * Service unavailable.
458 */ 589 */
459 class http_status_503 : public http_status_5xx { 590 class http_status_503 : public http_status_5xx {
460 public: 591 public:
592 /**
593 * @param m HTTP status message
594 */
461 explicit http_status_503(const string& m) 595 explicit http_status_503(const string& m)
462 : http_status_5xx("503",m) { } 596 : http_status_5xx("503",m) { }
463 explicit http_status_503() 597 explicit http_status_503()
464 : http_status_5xx("503","Service unavailable") { } 598 : http_status_5xx("503","Service unavailable") { }
465 }; 599 };
466 /** 600 /**
467 * Gateway timeout. 601 * Gateway timeout.
468 */ 602 */
469 class http_status_504 : public http_status_5xx { 603 class http_status_504 : public http_status_5xx {
470 public: 604 public:
605 /**
606 * @param m HTTP status message
607 */
471 explicit http_status_504(const string& m) 608 explicit http_status_504(const string& m)
472 : http_status_5xx("504",m) { } 609 : http_status_5xx("504",m) { }
473 explicit http_status_504() 610 explicit http_status_504()
474 : http_status_5xx("504","Gateway timeout") { } 611 : http_status_5xx("504","Gateway timeout") { }
475 }; 612 };
476 /** 613 /**
477 * HTTP version not supported. 614 * HTTP version not supported.
478 */ 615 */
479 class http_status_505 : public http_status_5xx { 616 class http_status_505 : public http_status_5xx {
480 public: 617 public:
618 /**
619 * @param m HTTP status message
620 */
481 explicit http_status_505(const string& m) 621 explicit http_status_505(const string& m)
482 : http_status_5xx("505",m) { } 622 : http_status_5xx("505",m) { }
483 explicit http_status_505() 623 explicit http_status_505()
484 : http_status_5xx("505","HTTP version not supported") { } 624 : http_status_5xx("505","HTTP version not supported") { }
485 }; 625 };
486 626
487 // Aliases 627 // Aliases
488 628
629 /**
630 * Convenience alias for informational http status exceptions
631 */
489 typedef http_status_1xx http_status_informational; 632 typedef http_status_1xx http_status_informational;
633 /**
634 * @see http_status_100
635 */
490 typedef http_status_100 http_status_continue; 636 typedef http_status_100 http_status_continue;
637 /**
638 * @see http_status_101
639 */
491 typedef http_status_101 http_status_switching_protocols; 640 typedef http_status_101 http_status_switching_protocols;
492 641
642 /**
643 * Convenience alias for success http status exceptions
644 */
493 typedef http_status_2xx http_status_sucessful; 645 typedef http_status_2xx http_status_sucessful;
646 /**
647 * @see http_status_200
648 */
494 typedef http_status_200 http_status_ok; 649 typedef http_status_200 http_status_ok;
650 /**
651 * @see http_status_201
652 */
495 typedef http_status_201 http_status_created; 653 typedef http_status_201 http_status_created;
654 /**
655 * @see http_status_202
656 */
496 typedef http_status_202 http_status_accepted; 657 typedef http_status_202 http_status_accepted;
658 /**
659 * @see http_status_203
660 */
497 typedef http_status_203 http_status_non_authoritative_information; 661 typedef http_status_203 http_status_non_authoritative_information;
662 /**
663 * @see http_status_204
664 */
498 typedef http_status_204 http_status_no_content; 665 typedef http_status_204 http_status_no_content;
666 /**
667 * @see http_status_205
668 */
499 typedef http_status_205 http_status_reset_content; 669 typedef http_status_205 http_status_reset_content;
670 /**
671 * @see http_status_206
672 */
500 typedef http_status_206 http_status_partial_content; 673 typedef http_status_206 http_status_partial_content;
501 674
675 /**
676 * Convenience alias for redirection http status exceptions
677 */
502 typedef http_status_3xx http_status_redirection; 678 typedef http_status_3xx http_status_redirection;
679 /**
680 * @see http_status_200
681 */
503 typedef http_status_300 http_status_multiple_choices; 682 typedef http_status_300 http_status_multiple_choices;
683 /**
684 * @see http_status_301
685 */
504 typedef http_status_301 http_status_moved_permanently; 686 typedef http_status_301 http_status_moved_permanently;
687 /**
688 * @see http_status_302
689 */
505 typedef http_status_302 http_status_found; 690 typedef http_status_302 http_status_found;
691 /**
692 * @see http_status_303
693 */
506 typedef http_status_303 http_status_see_other; 694 typedef http_status_303 http_status_see_other;
695 /**
696 * @see http_status_304
697 */
507 typedef http_status_304 http_status_not_modified; 698 typedef http_status_304 http_status_not_modified;
699 /**
700 * @see http_status_305
701 */
508 typedef http_status_305 http_status_use_proxy; 702 typedef http_status_305 http_status_use_proxy;
509 // 306 is unused and reserved 703 // 306 is unused and reserved
704 /**
705 * @see http_status_307
706 */
510 typedef http_status_307 http_status_temporary_redirect; 707 typedef http_status_307 http_status_temporary_redirect;
511 708
709 /**
710 * Convenience alias for client error http exceptions
711 */
512 typedef http_status_4xx http_status_client_error; 712 typedef http_status_4xx http_status_client_error;
713 /**
714 * @see http_status_400
715 */
513 typedef http_status_400 http_status_bad_request; 716 typedef http_status_400 http_status_bad_request;
717 /**
718 * @see http_status_401
719 */
514 typedef http_status_401 http_status_unauthorized; 720 typedef http_status_401 http_status_unauthorized;
721 /**
722 * @see http_status_402
723 */
515 typedef http_status_402 http_status_payment_required; 724 typedef http_status_402 http_status_payment_required;
725 /**
726 * @see http_status_403
727 */
516 typedef http_status_403 http_status_forbidden; 728 typedef http_status_403 http_status_forbidden;
729 /**
730 * @see http_status_404
731 */
517 typedef http_status_404 http_status_not_found; 732 typedef http_status_404 http_status_not_found;
733 /**
734 * @see http_status_405
735 */
518 typedef http_status_405 http_status_method_not_allowed; 736 typedef http_status_405 http_status_method_not_allowed;
737 /**
738 * @see http_status_406
739 */
519 typedef http_status_406 http_status_not_acceptable; 740 typedef http_status_406 http_status_not_acceptable;
741 /**
742 * @see http_status_407
743 */
520 typedef http_status_407 http_status_proxy_authentication_required; 744 typedef http_status_407 http_status_proxy_authentication_required;
745 /**
746 * @see http_status_408
747 */
521 typedef http_status_408 http_status_request_timeout; 748 typedef http_status_408 http_status_request_timeout;
749 /**
750 * @see http_status_409
751 */
522 typedef http_status_409 http_status_conflict; 752 typedef http_status_409 http_status_conflict;
753 /**
754 * @see http_status_410
755 */
523 typedef http_status_410 http_status_gone; 756 typedef http_status_410 http_status_gone;
757 /**
758 * @see http_status_411
759 */
524 typedef http_status_411 http_status_length_required; 760 typedef http_status_411 http_status_length_required;
761 /**
762 * @see http_status_412
763 */
525 typedef http_status_412 http_status_precondition_failed; 764 typedef http_status_412 http_status_precondition_failed;
765 /**
766 * @see http_status_413
767 */
526 typedef http_status_413 http_status_request_entity_too_large; 768 typedef http_status_413 http_status_request_entity_too_large;
769 /**
770 * @see http_status_414
771 */
527 typedef http_status_414 http_status_requrest_uri_too_long; 772 typedef http_status_414 http_status_requrest_uri_too_long;
773 /**
774 * @see http_status_415
775 */
528 typedef http_status_415 http_status_unsupported_media_type; 776 typedef http_status_415 http_status_unsupported_media_type;
777 /**
778 * @see http_status_416
779 */
529 typedef http_status_416 http_status_required_range_not_satisfiable; 780 typedef http_status_416 http_status_required_range_not_satisfiable;
781 /**
782 * @see http_status_417
783 */
530 typedef http_status_417 http_status_expectation_failed; 784 typedef http_status_417 http_status_expectation_failed;
531 785
786 /**
787 * Convenience alias for server error http exceptions
788 */
532 typedef http_status_5xx http_status_server_error; 789 typedef http_status_5xx http_status_server_error;
790 /**
791 * @see http_status_500
792 */
533 typedef http_status_500 http_status_internal_server_error; 793 typedef http_status_500 http_status_internal_server_error;
794 /**
795 * @see http_status_501
796 */
534 typedef http_status_501 http_status_not_implemented; 797 typedef http_status_501 http_status_not_implemented;
798 /**
799 * @see http_status_502
800 */
535 typedef http_status_502 http_status_bad_gateway; 801 typedef http_status_502 http_status_bad_gateway;
802 /**
803 * @see http_status_503
804 */
536 typedef http_status_503 http_status_service_unavailable; 805 typedef http_status_503 http_status_service_unavailable;
806 /**
807 * @see http_status_504
808 */
537 typedef http_status_504 http_status_gateway_timeout; 809 typedef http_status_504 http_status_gateway_timeout;
810 /**
811 * @see http_status_505
812 */
538 typedef http_status_505 http_status_http_version_not_supported; 813 typedef http_status_505 http_status_http_version_not_supported;
539 814
540} 815}
541 816
542#endif /* __SITECING_EXCEPTION_H */ 817#endif /* __SITECING_EXCEPTION_H */