Flatten routed by using functional try-catch blocks

This commit is contained in:
Daniel J. Hofmann 2015-10-09 17:28:45 +02:00 committed by Patrick Niklaus
parent e75be68466
commit f7a1e2f652

View File

@ -63,10 +63,8 @@ BOOL WINAPI console_ctrl_handler(DWORD ctrl_type)
}
#endif
int main(int argc, const char *argv[])
int main(int argc, const char *argv[]) try
{
try
{
LogPolicy::GetInstance().Unmute();
bool trial_run = false;
@ -183,12 +181,9 @@ int main(int argc, const char *argv[])
SimpleLogger().Write() << "freeing objects";
routing_server.reset();
SimpleLogger().Write() << "shutdown completed";
}
catch (const std::exception &e)
{
}
catch (const std::exception &e)
{
SimpleLogger().Write(logWARNING) << "exception: " << e.what();
return 1;
}
return 0;
}