exception
try {
// Code that may throw an exception
} catch (std::exception& e) {
// Handle the exception
}try {
// Code that may throw an exception
} catch (std::invalid_argument& e) {
// Handle invalid argument exception
} catch (std::out_of_range& e) {
// Handle out-of-range exception
}try {
// Outer try block
try {
// Inner try block
} catch (std::exception& e) {
// Handle inner exception
}
} catch (std::exception& e) {
// Handle outer exception
}