example of exception handling in c++ try catch
Example: C++ try catch
try {
//do something
} catch (const std::exception& e) {
std::cout << e.what(); // information from error printed
}
try {
//do something
} catch (const std::exception& e) {
std::cout << e.what(); // information from error printed
}