I have some code like this:
void myMethod(){
try{
someMethod();
}
catch(std::exception e){
std::cout<<"std::exception"<<std::endl;
}
catch(...){
std::cout<<"..."<<std::endl;
}
}
The thing is, that when someMethod
throws an exception is printing always
"..."
.
Also, the method someMethod
isn't written by me, and I don't know what kind of exceptions could throw (no documentation).
My question is, how can I know what kind of exception (its class type) has been thrown when I'm in the catch(...)
block?
Sometimes, my software enters inside that catch(...)
and I want to know why is catching a exception to save that situation.
Any ideas?