I've come to understand that Qt does not use exceptions. Why?
I've come to understand that Qt does not use exceptions. Why?
Somewhere the docs state that exceptions are not supported correctly by all compilers Qt wants to support. Another problem is that exceptions are not safe to use across "compiler boundaries".
But you may use exceptions whereever you want in your Code - they'll just pass right through the Qt code.
What about bad_alloc?
I also haven't found a reliable answer but you could also see a very intresting discussion in the qt-intrest mailing list: http://lists.trolltech.com/qt-intere...ad00054-0.html
I've grepped through the code: They use new(nothrow). At least in some places they use placement new. But I have no idea whether they do it everywhere...Originally Posted by krivenok
My grep also showed that at critical places in the code they catch all exceptions to clean up and then throw it again.
Bookmarks