#include #include #include "obj.h" using namespace std; class bad {}; void f() throw (bad); void g() throw (bad); obj static1 = 10; obj static2 = 20; int main() { int status = EXIT_FAILURE; obj auto3 = 30; obj auto4 = 40; try { obj auto5 = 50; obj auto6 = 60; f(); status = EXIT_SUCCESS; } catch (const bad&) { cout << "caught bad in main\n"; } return status; } void f() throw (bad) { obj auto7 = 70; obj auto8 = 80; static obj static9 = 90; obj *const p = new obj(100); g(); delete p; //Line 50 prevents this from being executed. } void g() throw (bad) { obj auto11 = 110; obj auto12 = 120; throw bad(); }