C++ HOW TO TRY CATCH FORMAT EXCEPTION code example
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
}