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