C++98 compatibility: Use throw() in destructor of std exceptions.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 2 Oct 2017 20:19:13 +0000 (22:19 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 2 Oct 2017 21:03:50 +0000 (23:03 +0200)
src/orm/ormrecord.h

index 30f569a947d2afe0fd905f51b36d44d08a14764d..fbdfb699e202cfc5b07fed524294a128c84aab47 100644 (file)
 #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;
@@ -43,14 +43,14 @@ class OrmNoObjectException : public OrmException
 {
 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>