Следующий код
#include <iostream>
class EXP2 {};
class A
{
public:
A() { throw EXP2(); }
};
class B
{
A a;
public:
B();
};
B::B()
try
: a()
{
}
catch(...)
{
std::cout << "Exception catch" << std::endl;
}
int main()
{
B b;
}
$ ./a.out
Exception catch
terminate called after throwing an instance of 'EXP2'
Abort trap: 6 (core dumped)