enabling exceptions in kcalc?

Evan Teran eteran at alum.rit.edu
Thu Jan 5 20:52:41 UTC 2012


And as a follow up question, how would I go about enabling exceptions
in the CMakeLists.txt file? Should I just add "-fexceptions" to the
flags in there? Or is there a "more correct" way?
Evan

On Thu, Jan 5, 2012 at 3:45 PM, Evan Teran <eteran at alum.rit.edu> wrote:
> Well the plan to catch *all* exceptions I may throw. Basically the
> pattern is excepted to be this:
>
> try {
>    do_some_gmp_function();
> } catch(const gmp_exception &) {
>    display_error_to_user();
> }
>
> so exceptions will never "bubble up". So, in the end, if I enable
> exceptions in kcalc, that won't be too big of a problem for anyone as
> long as they are properly handled in all cases?
>
> Evan
>
> On Thu, Jan 5, 2012 at 3:44 PM, Martin Sandsmark <sandsmark at samfundet.no> wrote:
>> On Thursday 5. January 2012 20.51.12 Evan Teran wrote:
>>> Currently, the kcalc build has exceptions disabled, would it be
>>> reasonable to enable them? Is there a policy against it entirely? Or
>>> is it just disabled by default?
>>
>> Qt doesn't handle exceptions very well (mostly for hysterical reasons¹), so
>> you must be sure to catch all of them before they bubble up to the Qt event
>> loop, at least. Other than that I don't think there's anything stopping you.
>>
>>
>> ¹: http://lists.trolltech.com/qt-interest/2002-12/thread00054-0.html
>>
>> --
>> Martin Sandsmark
>> _______________________________________________
>> Kde-utils-devel mailing list
>> Kde-utils-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/kde-utils-devel


More information about the Kde-utils-devel mailing list