[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: code guideline
From:       Rodrigo Bonifacio <rbonifacio123 () gmail ! com>
Date:       2014-08-12 13:41:21
Message-ID: CAGG4y8X4KWaXBhggAGqF+RvzD_L=aDs0HRqFt9M5HdzYRTj8sg () mail ! gmail ! com
[Download RAW message or body]

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 <thiago@kde.org>:
> 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
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic