#include using namespace std; class noisy { int x; public: noisy(int a = -1) : x(a) {} ~noisy() { cerr << "~noisy: " << x << " - RAII WORKED!\n"; } }; int main() { try { cerr << "Before block\n"; { noisy n1(13); throw 666; cerr << "Block ends\n"; } cerr << "After block\n"; } catch ( ... ) { throw; } return 0; }