tags:

views:

60

answers:

2

If I throw an exception:

throw Cat("Minoo");

Then I catch and rethrow with ... at some lower level in the call stack:

catch(...)
{
  throw;
}

Then at some other lower level in the call stack I try to catch with:

catch(const Cat& c)
{
  //Will it enter here, and if so will c be valid data?
}
catch(...)
{
}
+3  A: 

Yes, this is correct. This is addressed in the very next question of the section of the C++ FAQ that I linked you to on your previous question.

Tyler McHenry
Thanks, sorry I did not see it.
Net Citizen
+1  A: 

I would say yes, it will catch it and should be valid. This is actually fairly easy to test (at least you'll know if it works on your compiler). When in doubt just try it out ;).

Evan Teran