summaryrefslogtreecommitdiff
path: root/include/db/exception.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/db/exception.h')
-rw-r--r--include/db/exception.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/db/exception.h b/include/db/exception.h
new file mode 100644
index 0000000..47c99c8
--- /dev/null
+++ b/include/db/exception.h
@@ -0,0 +1,33 @@
+/*
+ * exception.h
+ *
+ * Created on: 28.10.2012
+ * Author: savop
+ */
+
+#ifndef EXCEPTION_H_
+#define EXCEPTION_H_
+
+#include <exception>
+#include <string>
+
+namespace db {
+
+class SQLiteException : public std::exception {
+public:
+ SQLiteException(std::string msg) throw()
+ : message(msg)
+ {}
+ virtual ~SQLiteException() throw() {}
+ virtual const char* what() const throw()
+ {
+ return message.c_str();
+ }
+private:
+ std::string message;
+};
+
+} // namespace db
+
+
+#endif /* EXCEPTION_H_ */