Qt 4.8
|
The Exception class provides a base class for exceptions that can transferred across threads. More...
#include <qtconcurrentexception.h>
Public Functions | |
virtual Exception * | clone () const |
In your QtConcurrent::Exception subclass, reimplement clone() like this: More... | |
virtual void | raise () const |
In your QtConcurrent::Exception subclass, reimplement raise() like this: More... | |
The Exception class provides a base class for exceptions that can transferred across threads.
Qt Concurrent supports throwing and catching exceptions across thread boundaries, provided that the exception inherit from QtConcurrent::Exception and implement two helper functions:
QtConcurrent::Exception subclasses must be thrown by value and caught by reference:
If you throw an exception that is not a subclass of QtConcurrent::Exception, the Qt Concurrent functions will throw a QtConcurrent::UnhandledException in the receiver thread.
When using QFuture, transferred exceptions will be thrown when calling the following functions:
Definition at line 65 of file qtconcurrentexception.h.
|
virtual |
In your QtConcurrent::Exception subclass, reimplement clone() like this:
Reimplemented in QtConcurrent::UnhandledException.
Definition at line 134 of file qtconcurrentexception.cpp.
Referenced by QtConcurrent::UnhandledException::clone().
|
virtual |
In your QtConcurrent::Exception subclass, reimplement raise() like this:
Reimplemented in QtConcurrent::UnhandledException.
Definition at line 128 of file qtconcurrentexception.cpp.