I am deriving an exception class from Qtconcurrent::Exception, and am receiving a compilation error
looser throw specifier for 'virtual SException::~SException()'
overriding 'virtual QtConcurrent::Exception::~Exception() throw()'
The class is as follows
class SException : public QtConcurrent::Exception
{
public:
SException(const QString& message) : message_(message) {}
void raise() const { throw *this; }
Exception *clone() const { return new SException(*this); }
QString message
() const { return message_;
}
private:
};
class SException : public QtConcurrent::Exception
{
public:
SException(const QString& message) : message_(message) {}
void raise() const { throw *this; }
Exception *clone() const { return new SException(*this); }
QString message() const { return message_; }
private:
QString message_;
};
To copy to clipboard, switch view to plain text mode
How do you specify the destructor correctly? I have already tried specifying a virtual destructor in the derived class but still get the same error.
Bookmarks