All standard exceptions derive from std::exception
, so catch that instead:
try {
// throw exception here
}
catch (const std::exception &e) {
// handle exception here
}
solved How to catch any c++ standard exception?
All standard exceptions derive from std::exception
, so catch that instead:
try {
// throw exception here
}
catch (const std::exception &e) {
// handle exception here
}
solved How to catch any c++ standard exception?