![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtCore More...
#include <qexception.h>
Public Member Functions | |
QException ()=default | |
Constructs a QException object. | |
~QException () noexcept | |
Destroys this QException object. | |
QException (const QException &)=default | |
Creates a copy of other. | |
QException & | operator= (const QException &)=default |
Copy-assigns other over this object. | |
virtual void | raise () const |
In your QException subclass, reimplement raise() like this: | |
virtual QException * | clone () const |
In your QException subclass, reimplement clone() like this: | |
\inmodule QtCore
The QException class provides a base class for exceptions that can be transferred across threads.
Qt Concurrent supports throwing and catching exceptions across thread boundaries, provided that the exception inherits from QException and implements two helper functions:
QException subclasses must be thrown by value and caught by reference:
If you throw an exception that is not a subclass of QException, the \l{Qt Concurrent} functions will throw a QUnhandledException in the receiver thread.
When using QFuture, transferred exceptions will be thrown when calling the following functions: \list
Definition at line 21 of file qexception.h.
|
default |
Constructs a QException object.
|
noexcept |
Destroys this QException object.
Definition at line 88 of file qexception.cpp.
|
default |
Creates a copy of other.
|
virtual |
In your QException subclass, reimplement clone() like this:
Reimplemented in MyException, MyException, and QUnhandledException.
Definition at line 122 of file qexception.cpp.
|
default |
Copy-assigns other over this object.
|
virtual |
In your QException subclass, reimplement raise() like this:
Reimplemented in MyException, MyException, and QUnhandledException.
Definition at line 116 of file qexception.cpp.