[−][src]Struct qt_core::QUnhandledException
The UnhandledException class represents an unhandled exception in a worker thread.
C++ class: QUnhandledException
.
The UnhandledException class represents an unhandled exception in a worker thread.
If a worker thread throws an exception that is not a subclass of QException, the Qt functions will throw a QUnhandledException on the receiver thread side.
Inheriting from this class is not supported.
Methods
impl QUnhandledException
[src]
pub unsafe fn clone(&self) -> Ptr<QUnhandledException>
[src]
Calls C++ function: virtual QUnhandledException* QUnhandledException::clone() const
.
pub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QUnhandledException>>
) -> Ref<QUnhandledException>
[src]
&self,
other: impl CastInto<Ref<QUnhandledException>>
) -> Ref<QUnhandledException>
The UnhandledException class represents an unhandled exception in a worker thread.
Calls C++ function: QUnhandledException& QUnhandledException::operator=(const QUnhandledException& other)
.
The UnhandledException class represents an unhandled exception in a worker thread.
If a worker thread throws an exception that is not a subclass of QException, the Qt functions will throw a QUnhandledException on the receiver thread side.
Inheriting from this class is not supported.
pub unsafe fn new() -> CppBox<QUnhandledException>
[src]
The UnhandledException class represents an unhandled exception in a worker thread.
Calls C++ function: [constructor] void QUnhandledException::QUnhandledException()
.
The UnhandledException class represents an unhandled exception in a worker thread.
If a worker thread throws an exception that is not a subclass of QException, the Qt functions will throw a QUnhandledException on the receiver thread side.
Inheriting from this class is not supported.
pub unsafe fn new_copy(
other: impl CastInto<Ref<QUnhandledException>>
) -> CppBox<QUnhandledException>
[src]
other: impl CastInto<Ref<QUnhandledException>>
) -> CppBox<QUnhandledException>
The UnhandledException class represents an unhandled exception in a worker thread.
Calls C++ function: [constructor] void QUnhandledException::QUnhandledException(const QUnhandledException& other)
.
The UnhandledException class represents an unhandled exception in a worker thread.
If a worker thread throws an exception that is not a subclass of QException, the Qt functions will throw a QUnhandledException on the receiver thread side.
Inheriting from this class is not supported.
pub unsafe fn raise(&self)
[src]
Calls C++ function: virtual void QUnhandledException::raise() const
.
Methods from Deref<Target = QException>
pub unsafe fn clone(&self) -> Ptr<QException>
[src]
In your QException subclass, reimplement clone() like this:
Calls C++ function: virtual QException* QException::clone() const
.
In your QException subclass, reimplement clone() like this:
MyException *MyException::clone() const { return new MyException(*this); }
pub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QException>>
) -> Ref<QException>
[src]
&self,
other: impl CastInto<Ref<QException>>
) -> Ref<QException>
Qt Concurrent supports throwing and catching exceptions across thread boundaries, provided that the exception inherit from QException and implement two helper functions:
Calls C++ function: QException& QException::operator=(const QException& other)
.
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); } };
QException subclasses must be thrown by value and caught by reference:
try { QtConcurrent::blockingMap(list, throwFunction); // throwFunction throws MyException } catch (MyException &e) { // handle exception }
If you throw an exception that is not a subclass of QException, the Qt functions will throw a QUnhandledException in the receiver thread.
When using QFuture, transferred exceptions will be thrown when calling the following functions:
pub unsafe fn raise(&self)
[src]
In your QException subclass, reimplement raise() like this:
Calls C++ function: virtual void QException::raise() const
.
In your QException subclass, reimplement raise() like this:
void MyException::raise() const { throw *this; }
Trait Implementations
impl CppDeletable for QUnhandledException
[src]
unsafe fn delete(&self)
[src]
Destroys the instance of QUnhandledException. The destructor is virtual.
Calls C++ function: virtual [destructor] void QUnhandledException::~QUnhandledException()
.
Destroys the instance of QUnhandledException. The destructor is virtual.
impl Deref for QUnhandledException
[src]
type Target = QException
The resulting type after dereferencing.
fn deref(&self) -> &QException
[src]
Calls C++ function: QException* static_cast<QException*>(QUnhandledException* ptr)
.
impl DynamicCast<QUnhandledException> for QException
[src]
unsafe fn dynamic_cast(ptr: Ptr<QException>) -> Ptr<QUnhandledException>
[src]
Calls C++ function: QUnhandledException* dynamic_cast<QUnhandledException*>(QException* ptr)
.
impl StaticDowncast<QUnhandledException> for QException
[src]
unsafe fn static_downcast(ptr: Ptr<QException>) -> Ptr<QUnhandledException>
[src]
Calls C++ function: QUnhandledException* static_cast<QUnhandledException*>(QException* ptr)
.
impl StaticUpcast<QException> for QUnhandledException
[src]
unsafe fn static_upcast(ptr: Ptr<QUnhandledException>) -> Ptr<QException>
[src]
Calls C++ function: QException* static_cast<QException*>(QUnhandledException* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QUnhandledException
impl Send for QUnhandledException
impl Sync for QUnhandledException
impl Unpin for QUnhandledException
impl UnwindSafe for QUnhandledException
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,