summaryrefslogtreecommitdiffabout
path: root/include/kingate/exception.h
authorMichael Krelin <hacker@klever.net>2005-01-29 20:14:37 (UTC)
committer Michael Krelin <hacker@klever.net>2005-01-29 20:14:37 (UTC)
commitff4b919683537625f693eedf53006364d0f8444d (patch) (side-by-side diff)
tree4c19e38c0832b16b4ca98ae5af6542d932373eb1 /include/kingate/exception.h
parentf9a64a67c89a7566e63ed66c3a69c359abea4dfd (diff)
downloadkingate-ff4b919683537625f693eedf53006364d0f8444d.zip
kingate-ff4b919683537625f693eedf53006364d0f8444d.tar.gz
kingate-ff4b919683537625f693eedf53006364d0f8444d.tar.bz2
initial commit into repository0.0
Diffstat (limited to 'include/kingate/exception.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/kingate/exception.h44
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 @@
+#ifndef __KINGATE_EXCEPTION_H
+#define __KINGATE_EXCEPTION_H
+
+#include <stdexcept>
+#include <konforka/exception.h>
+
+/**
+ * @file
+ * @brief The kingate-specific exceptions.
+ */
+
+/**
+ * @brief the main kingate namespace.
+ */
+namespace kingate {
+ using namespace std;
+
+ /**
+ * The base for kingate-specific exception.
+ */
+ class exception : public konforka::exception {
+ public:
+ explicit exception(const string& w)
+ : konforka::exception(NOCODEPOINT,w) { }
+ exception(const string& fi,const string& fu,int l,const string &w)
+ : konforka::exception(fi,fu,l,w) { }
+ };
+
+ /**
+ * Thrown if the specified variable or parameter wasn't found.
+ */
+ class exception_notfound : public exception {
+ public:
+ explicit exception_notfound(const string& w)
+ : exception(w) { }
+ exception_notfound(const string& fi,const string& fu,int l,const string& w)
+ : exception(fi,fu,l,w) { }
+ };
+}
+
+#endif /* __KINGATE_EXCEPTION_H */
+/*
+ * vim:set ft=cpp:
+ */