#include #include using namespace std; void function2() { try { cout << "Inside function2 1." << endl ; throw 10 ; cout << "Inside function2 2." << endl ; } catch( int x1 ) { cout << "Inside function2 catch." << endl ; throw x1 ; } } void function1() { try { cout << "Inside function1 1." << endl ; function2() ; } catch( const char* str1 ) { cout << "Inside function1 catch." << endl ; } } int main() { try { try { function1() ; } catch ( int& e1 ) { cout << "Integer Exception" << endl ; } } catch( int& e2 ) { cout << "Outer Integer Exception" << endl ; } return 0; }