// Here there is no way to catch the error thrown by f() structA { int a; A::A() : a(f()) {} };
// The value thrown from f() can be caught if a try-catch block is used as // the function body and the initializer list is moved after the try keyword structB { int b; B::B() try : b(f()) { } catch(int e) { } intB::C()try{ throw2; return1; } catch(int e) { cout<<"exception "<<e<<endl; } };