summaryrefslogtreecommitdiffabout
path: root/include/kingate/exception.h
authorMichael Krelin <hacker@klever.net>2005-03-31 22:06:45 (UTC)
committer Michael Krelin <hacker@klever.net>2005-03-31 22:06:45 (UTC)
commit0942697ed6ee058809db963f9cc3126f93139de2 (patch) (unidiff)
tree2a5cdf5d200e302a6d6394e4a0193929dcb11bb0 /include/kingate/exception.h
parent5b50415afdb7b708874293ac7047b9b70de78e59 (diff)
downloadkingate-0942697ed6ee058809db963f9cc3126f93139de2.zip
kingate-0942697ed6ee058809db963f9cc3126f93139de2.tar.gz
kingate-0942697ed6ee058809db963f9cc3126f93139de2.tar.bz2
1. renamed url_escape/unescape to encode/decode
2. introduced a number of wrappers for accessing meta-variables mentioned in RFC3875 3. bumped library version info
Diffstat (limited to 'include/kingate/exception.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/kingate/exception.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/kingate/exception.h b/include/kingate/exception.h
index 6ebb361..85d89ea 100644
--- a/include/kingate/exception.h
+++ b/include/kingate/exception.h
@@ -1,44 +1,53 @@
1#ifndef __KINGATE_EXCEPTION_H 1#ifndef __KINGATE_EXCEPTION_H
2#define __KINGATE_EXCEPTION_H 2#define __KINGATE_EXCEPTION_H
3 3
4#include <stdexcept> 4#include <stdexcept>
5#include <konforka/exception.h> 5#include <konforka/exception.h>
6 6
7/** 7/**
8 * @file 8 * @file
9 * @brief The kingate-specific exceptions. 9 * @brief The kingate-specific exceptions.
10 */ 10 */
11 11
12/** 12/**
13 * @brief the main kingate namespace. 13 * @brief the main kingate namespace.
14 */ 14 */
15namespace kingate { 15namespace kingate {
16 using namespace std; 16 using namespace std;
17 17
18 /** 18 /**
19 * The base for kingate-specific exception. 19 * The base for kingate-specific exception.
20 */ 20 */
21 class exception : public konforka::exception { 21 class exception : public konforka::exception {
22 public: 22 public:
23 explicit exception(const string& w) 23 explicit exception(const string& w)
24 : konforka::exception(NOCODEPOINT,w) { } 24 : konforka::exception(NOCODEPOINT,w) { }
25 exception(const string& fi,const string& fu,int l,const string &w) 25 exception(const string& fi,const string& fu,int l,const string &w)
26 : konforka::exception(fi,fu,l,w) { } 26 : konforka::exception(fi,fu,l,w) { }
27 }; 27 };
28 28
29 /** 29 /**
30 * Thrown if the specified variable or parameter wasn't found. 30 * Thrown if the specified variable or parameter wasn't found.
31 */ 31 */
32 class exception_notfound : public exception { 32 class exception_notfound : public exception {
33 public: 33 public:
34 explicit exception_notfound(const string& w) 34 explicit exception_notfound(const string& w)
35 : exception(w) { } 35 : exception(w) { }
36 exception_notfound(const string& fi,const string& fu,int l,const string& w) 36 exception_notfound(const string& fi,const string& fu,int l,const string& w)
37 : exception(fi,fu,l,w) { } 37 : exception(fi,fu,l,w) { }
38 }; 38 };
39
40 /**
41 * Thrown in case of unexpected server behaviour.
42 */
43 class server_error : public exception {
44 public:
45 server_error(const string& fi,const string& fu,int l,const string& w)
46 : exception(fi,fu,l,w) { }
47 };
39} 48}
40 49
41#endif /* __KINGATE_EXCEPTION_H */ 50#endif /* __KINGATE_EXCEPTION_H */
42/* 51/*
43 * vim:set ft=cpp: 52 * vim:set ft=cpp:
44 */ 53 */