]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/orm/ormrecord.h
update for the search
[toast/confclerk.git] / src / orm / ormrecord.h
index f3c0fcc87ca2a7d7173bd9c9f34e98753f205f76..3667315be97e5b3f3188bff83adc44dbdca2899c 100644 (file)
 
 class OrmException
 {
 
 class OrmException
 {
+public:
+    OrmException(const QString& text) : mText(text) {};
+    virtual ~OrmException(){};
+    virtual const QString& text() const { return mText; }
+private:
+    QString mText;
 };
 
 class OrmNoObjectException : OrmException
 {
 };
 
 class OrmNoObjectException : OrmException
 {
+public:
+    OrmNoObjectException() : OrmException("No object exception"){};
+    ~OrmNoObjectException(){};
 };
 
 class OrmSqlException : OrmException
 {
 public:
 };
 
 class OrmSqlException : OrmException
 {
 public:
-    OrmSqlException(const QString& text) : mText(text) {}
-    QString text() const { return mText; }
-
-private:
-    QString mText;
+    OrmSqlException(const QString& text) : OrmException( QString("Sql error: ") + text ) {};
+    ~OrmSqlException(){};
 };
 
 template <typename T>
 };
 
 template <typename T>