author | Michael Krelin <hacker@klever.net> | 2005-01-29 20:14:37 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2005-01-29 20:14:37 (UTC) |
commit | ff4b919683537625f693eedf53006364d0f8444d (patch) (unidiff) | |
tree | 4c19e38c0832b16b4ca98ae5af6542d932373eb1 /include/kingate/exception.h | |
parent | f9a64a67c89a7566e63ed66c3a69c359abea4dfd (diff) | |
download | kingate-ff4b919683537625f693eedf53006364d0f8444d.zip kingate-ff4b919683537625f693eedf53006364d0f8444d.tar.gz kingate-ff4b919683537625f693eedf53006364d0f8444d.tar.bz2 |
initial commit into repository0.0
-rw-r--r-- | include/kingate/exception.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/kingate/exception.h b/include/kingate/exception.h new file mode 100644 index 0000000..6ebb361 --- a/dev/null +++ b/include/kingate/exception.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef __KINGATE_EXCEPTION_H | ||
2 | #define __KINGATE_EXCEPTION_H | ||
3 | |||
4 | #include <stdexcept> | ||
5 | #include <konforka/exception.h> | ||
6 | |||
7 | /** | ||
8 | * @file | ||
9 | * @brief The kingate-specific exceptions. | ||
10 | */ | ||
11 | |||
12 | /** | ||
13 | * @brief the main kingate namespace. | ||
14 | */ | ||
15 | namespace kingate { | ||
16 | using namespace std; | ||
17 | |||
18 | /** | ||
19 | * The base for kingate-specific exception. | ||
20 | */ | ||
21 | class exception : public konforka::exception { | ||
22 | public: | ||
23 | explicit exception(const string& w) | ||
24 | : konforka::exception(NOCODEPOINT,w) { } | ||
25 | exception(const string& fi,const string& fu,int l,const string &w) | ||
26 | : konforka::exception(fi,fu,l,w) { } | ||
27 | }; | ||
28 | |||
29 | /** | ||
30 | * Thrown if the specified variable or parameter wasn't found. | ||
31 | */ | ||
32 | class exception_notfound : public exception { | ||
33 | public: | ||
34 | explicit exception_notfound(const string& w) | ||
35 | : exception(w) { } | ||
36 | exception_notfound(const string& fi,const string& fu,int l,const string& w) | ||
37 | : exception(fi,fu,l,w) { } | ||
38 | }; | ||
39 | } | ||
40 | |||
41 | #endif /* __KINGATE_EXCEPTION_H */ | ||
42 | /* | ||
43 | * vim:set ft=cpp: | ||
44 | */ | ||