#include <iostream>
int f(){
throw 1;
}
class A
{
public:
A() try : _k(f())
{}
catch (int)
{
std::cout << "Exception 1" << std::endl;
}
private:
int _k;
};
int main(void)
{
try
{
A a;
} catch(int)
{
std::cout << "Exception 2" << std::endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKCWludCBmKCl7CgkJdGhyb3cgMTsKCX0KCgljbGFzcyBBCgl7CglwdWJsaWM6CgkJQSgpIHRyeSA6IF9rKGYoKSkKCQl7fQoJCWNhdGNoIChpbnQpCgkJewoJCQlzdGQ6OmNvdXQgPDwgIkV4Y2VwdGlvbiAxIiA8PCBzdGQ6OmVuZGw7CgkJfQoKCXByaXZhdGU6CgkJaW50IF9rOwoJfTsKCmludCBtYWluKHZvaWQpCnsKCXRyeQoJewoJCUEgYTsKCX0gY2F0Y2goaW50KQoJewoJCXN0ZDo6Y291dCA8PCAiRXhjZXB0aW9uIDIiIDw8IHN0ZDo6ZW5kbDsKCX0KCXJldHVybiAwOwp9