From c793b28b56c1a079bc016ce5567c4a4458002b2a Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Mon, 2 Oct 2017 22:19:13 +0200 Subject: [PATCH] C++98 compatibility: Use throw() in destructor of std exceptions. --- src/orm/ormrecord.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/orm/ormrecord.h b/src/orm/ormrecord.h index 30f569a..fbdfb69 100644 --- a/src/orm/ormrecord.h +++ b/src/orm/ormrecord.h @@ -29,11 +29,11 @@ #include #include -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 -- 2.39.5