[aspectc-user] Catch exceptions in main()?

Olaf Spinczyk os at aspectc.org
Thu Jan 5 11:34:51 CET 2012


Hi Markus!

You might be pleased to hear that Puma, AspectC++, and Ag++ are no 
longer compiled with "-fno-exceptions -fno-rtti". AspectC++ and Ag++ now 
have exception handlers in main() (as you proposed). We evaluated the 
overhead and found that it is no problem for the Puma library.

Best regard and thanks for your hint,

Olaf


On 11/21/2011 05:28 PM, Olaf Spinczyk wrote:
> Hi!
>
> The default compiler settings for Puma/AspectC++ contain "-fno-rtti 
> -fno-exceptions". Therefore, we can't do what you propose at the 
> moment -- we would have to change the setting first. If somebody has 
> the time for evaluating the code size / performance implications of 
> removing these options, go ahead. I'd happily remove the options if 
> the impact was irrelevant.
>
> Cheers,
>
> Olaf
>
>
> On 10/29/2011 06:55 PM, Markus Elfring wrote:
>> Hello!
>>
>> I expect that exception handling is usually supported by a C++ 
>> program. I wonder why your main() functions (in the source files 
>> "ac++.cc" and "ag++.cc") do not contain corresponding try and catch 
>> instructions so far.
>> http://stackoverflow.com/questions/368184/does-it-make-sense-to-catch-exceptions-in-the-main 
>>
>>
>> How do you think about the recommendations by Matthew Wilson in the 
>> article "Quality Matters #6: Exceptions for Practically-Unrecoverable 
>> Conditions"?
>> http://accu.org/index.php/journals/1706
>>
>> Would you like to adjust the implementation of your main() functions 
>> if you consider effects for uncaught/unhandled exceptions like they 
>> are described by Bruce Eckel?
>> http://www.codeguru.com/cpp/tic/tic0259.shtml#Heading684
>>
>> Regards,
>> Markus
>> _______________________________________________
>> aspectc-user mailing list
>> aspectc-user at aspectc.org
>> http://www.aspectc.org/mailman/listinfo/aspectc-user
>>
>
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
>




More information about the aspectc-user mailing list