#include #include using namespace std; //Old style before c++ 11 void method1() throw() { } //Recommended style after c++ 11 void method2() noexcept { } void method3() throw() { throw 5 ; } int main() { try { method3() ; } catch ( int& err ) { cout << "Inside catch." << endl ; } return 0; }