int main()
{
try {
// main routine
}
catch(...) {
// error handling
}
}