//******************************************** //test throw exception out of function //******************************************** #include using namespace std; void funcThrow(){ try{ throw 1; } catch(int b){ cout<<"catch inside funcThrow()\n"; throw ; } } int main(){ try{ funcThrow(); } catch(int a){ cout<<"catch inside main\n"; } return 0; }