Is `catch(...) { throw; }` a bad practice?
- by ereOn
While I agree that catching ... without rethrowing is indeed wrong, I however believe that using constructs like this:
try
{
// Stuff
}
catch (...)
{
// Some cleanup
throw;
}
Is acceptable in cases where RAII is not applicable. (Please, don't ask... not everybody in my company likes object-oriented programming and RAII is often seen as…