TEST 1
#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
try{
try {throw "help...";}
catch(int){cout<<"1in fc...int hanlder"<<endl;}
try {throw "help...";}
catch(char const*){cout<<"2in fc...int hanlder"<<endl;}
}
catch(...)
{
cout<<"here"<<endl;
}
return 0;
}
Output
here
TEST 2
#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
try{
//try {throw "help...";}
//catch(int){cout<<"1in fc...int hanlder"<<endl;}
try {throw "help...";}
catch(char const*){cout<<"2in fc...int hanlder"<<endl;}
}
catch(...)
{
cout<<"here"<<endl;
}
return 0;
}
Output
2in fc...int hanlder