X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/blobdiff_plain/6a807e71a7ec304b50478f6280a7e991c8d36b99..9d8946b6d0c7c6ff1abee00dba12046f593e26f8:/src/orm/ormrecord.h diff --git a/src/orm/ormrecord.h b/src/orm/ormrecord.h index f3c0fcc..3667315 100644 --- a/src/orm/ormrecord.h +++ b/src/orm/ormrecord.h @@ -11,20 +11,26 @@ class OrmException { +public: + OrmException(const QString& text) : mText(text) {}; + virtual ~OrmException(){}; + virtual const QString& text() const { return mText; } +private: + QString mText; }; class OrmNoObjectException : OrmException { +public: + OrmNoObjectException() : OrmException("No object exception"){}; + ~OrmNoObjectException(){}; }; 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