Dear all, I am conducting a survey about the use of exception handling constructs in C++. I would really appreciate if you could contribute to this research by answering a few questions on the subject. The survey is available on-line: https://pt.surveymonkey.com/s/exceptionHandling All the best, Rodrigo. 2014-07-09 15:20 GMT-03:00 Thiago Macieira : > On Saturday 28 June 2014 08:51:42 Rodrigo Bonifacio wrote: >> Dear all, is there any code guideline that recommends developers to avoid >> the use of exception handling mechanisms within the core libraries of KDE? > > I'm going to let others speak about the use of exceptions in your own code, > but note this: > > Qt classes are not exception-safe. > > So if you are allowed to use exceptions in your part of the KDE libraries, > make sure that you don't: > > a) use Qt container types, like QList and QVector, on types that may throw on > construction or copying > b) let exceptions escape back into Qt code, including: > 1) slot activation > 2) event handling > 3) callbacks (such as qSort) > > Using QString and QByteArray in code that uses exceptions is mostly safe > because no exception can happen inside them. Stack unwinding would be no > different than a regular end of scope anyway. > > -- > Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org > Software Architect - Intel Open Source Technology Center > PGP/GPG: 0x6EF45358; fingerprint: > E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358 >