Little-known C++: function-try-block
Function-try-block is a mechanism in C++ to establish an exception handler around the body of a function. The following is an example:
int foo()
{
throw std::runtime_error("oops...");
}
int main()
try
{
foo();
return 0;
}
catch (...)
{
return -1;
}