When dog objects in main() go out of scope, it invokes destructor. Since destructor throws an exception, due to multiple exception condition program crashes. class dog { public: string m_name; dog(string name) { m_name = name; cout << name << " is born." << endl; } ~dog() { cout << m_name << " is distroied.\n" << endl; throw 10; } }; int main() { try { dog dog1("Henry"); dog dog2("Bob"); } catch (int e) { cout << e << " is caught" << endl; } return 1; } Solution 1: Destructor swallow the exception ~dog() { try { // Enclose all the exception prone code here } catch (MYEXCEPTION e) { // Catch exception } catch (...) { } } Solution 2: Move ...