According to documentation for the QException class, Qt Concurrent supports throwing and catching exceptions across thread boundaries, provided that the exception inherit from QException and implement two helper functions. class MyException : public QException { public: void raise() const override { throw *this; } MyException *clone() const override { return new MyException(*this); } }; If such functions are not overridden in descendants, we can get unexpected behavior for exception thrown from a thread.
Should they be pure virtual to begin with ?
(In reply to Sergio Martins from comment #1) > Should they be pure virtual to begin with ? If you mean in QException class, i believe no, because QConcurrent need to throw something, but your code can just not expect QException, but something more specific.
ok, makes sense