Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

src_corelib_concurrent_qtconcurrentexception.cpp

//! [0]

00003 class MyException : public QtConcurrent::Exception
{
public:
00006     void raise() const { throw *this; }
00007     Exception *clone() const { return new MyException(*this); }
};

//! [0]


//! [1]

try  {
    QtConcurrent::blockingMap(list, throwFunction); // throwFunction throws MyException
} catch (MyException &e) {
    // handle exception
}

//! [1]


//! [2]

void MyException::raise() const { throw *this; }

//! [2]


//! [3]

MyException *MyException::clone() const { return new MyException(*this); }

//! [3]

Generated by  Doxygen 1.6.0   Back to index