How does the Qt handle the exception? There's no any Exception class found in Qt class libray. Why don't they provide them?
How does the Qt handle the exception? There's no any Exception class found in Qt class libray. Why don't they provide them?
try
{
doSomething();
}
catch(std::exception& e)
{
qDebug()<<e.what();
}
Qt simply doesn't use exceptions. The most important reason probably is that not all platforms Qt works on support exceptions, so using them would break portability. But you're free to use exceptions in your code.Originally Posted by bruce1007
Bookmarks