#include <QDebug>
#include <stdexcept>
-class OrmException : public std::runtime_error
+class OrmException: public std::runtime_error
{
public:
OrmException(const QString& text) : std::runtime_error(text.toStdString()), mText(text) {}
- virtual ~OrmException(){}
+ virtual ~OrmException() throw() {}
virtual const QString& text() const { return mText; }
private:
QString mText;
{
public:
OrmNoObjectException() : OrmException("SQL query expects one record but found none."){}
- ~OrmNoObjectException(){}
+ ~OrmNoObjectException() throw() {}
};
class OrmSqlException : public OrmException
{
public:
OrmSqlException(const QString& text) : OrmException( QString("Sql error: ") + text ) {}
- ~OrmSqlException(){}
+ ~OrmSqlException() throw() {}
};
template <typename T>