diff Exception.hpp @ 0:a3834af36579

Working with memory backend.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Mon, 20 Aug 2012 15:49:48 +0200
parents
children d7b384b4a834
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Exception.hpp	Mon Aug 20 15:49:48 2012 +0200
@@ -0,0 +1,26 @@
+#ifndef EXCEPTION_HPP
+#define EXCEPTION_HPP
+
+#include <QtCore/QString>
+
+class Exception {
+
+public:
+  virtual QString toString() const
+  {
+    return errorMsg_;
+  }
+
+
+protected:
+  Exception(const QString& errorMsg) : errorMsg_(errorMsg) {}
+  virtual ~Exception() {}
+
+  void setErrorMsg(QString& errorMsg);
+  const QString& errorMsg(QString& errorMsg);
+
+private:
+  QString errorMsg_;
+};
+
+#endif //EXCEPTION_HPP