![]() |
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 | |
QUnhandledException (std::exception_ptr exception=nullptr) noexcept | |
~QUnhandledException () noexcept override | |
QUnhandledException (QUnhandledException &&other) noexcept | |
Move-constructs a QUnhandledException, making it point to the same object as other was pointing to. | |
QUnhandledException (const QUnhandledException &other) noexcept | |
Constructs a QUnhandledException object as a copy of other. | |
void | swap (QUnhandledException &other) noexcept |
QUnhandledException & | operator= (const QUnhandledException &other) noexcept |
Assigns other to this QUnhandledException object and returns a reference to this QUnhandledException object. | |
void | raise () const override |
QUnhandledException * | clone () const override |
std::exception_ptr | exception () const |
Public Member Functions inherited from QException | |
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. |
\inmodule QtCore
The QUnhandledException class represents an unhandled exception in a Qt Concurrent worker thread.
If a worker thread throws an exception that is not a subclass of QException, the \l{Qt Concurrent} functions will throw a QUnhandledException on the receiver thread side. The information about the actual exception that has been thrown will be saved in the QUnhandledException class and can be obtained using the exception() method. For example, you can process the exception held by QUnhandledException in the following way:
Inheriting from this class is not supported.
Definition at line 34 of file qexception.h.
|
noexcept |
Constructs a new QUnhandledException object. Saves the pointer to the actual exception object if exception is passed.
Definition at line 144 of file qexception.cpp.
|
overridenoexcept |
Definition at line 194 of file qexception.cpp.
|
noexcept |
Move-constructs a QUnhandledException, making it point to the same object as other was pointing to.
Definition at line 153 of file qexception.cpp.
|
noexcept |
Constructs a QUnhandledException object as a copy of other.
Definition at line 161 of file qexception.cpp.
|
overridevirtual |
Reimplemented from QException.
Definition at line 204 of file qexception.cpp.
std::exception_ptr QUnhandledException::exception | ( | ) | const |
Returns a \l{https://en.cppreference.com/w/cpp/error/exception_ptr}{pointer} to the actual exception that has been saved in this QUnhandledException. Returns a null
pointer, if it does not point to an exception object.
Definition at line 189 of file qexception.cpp.
|
noexcept |
Assigns other to this QUnhandledException object and returns a reference to this QUnhandledException object.
Definition at line 170 of file qexception.cpp.
|
overridevirtual |
Reimplemented from QException.
Definition at line 198 of file qexception.cpp.
|
inlinenoexcept |
Definition at line 43 of file qexception.h.