Exceptions struct Error { int i; Error(int i) : i(i) {} }; struct OtherError { }; try { throw Error(42); } catch (Error e) { cout << e.i << endl; throw OtherError(); } catch (...) { throw; }