I have two pieces of code performing virtually the same task. While one of
them (f1) is written in a try block, hoping to catch as many exceptions as
possible, the other one (f2) is not:
void f1 (void)
{
try
{
do_task1();
do_task2();
do_task3();
}
catch (exception1){...}
catch (exception2){...}
...
}
void f2 (void)
{
do_task1();
do_task2();
do_task3();
}
Does f1 imposes any necessary runtime-overhead? Is to answer this question
implementation dependent? And if so, is there a general answer applies to
most implementations?
ben