add try catch, fixes coverity issues 1229132 and 1229133

This commit is contained in:
Dennis Luxen 2014-07-30 11:28:36 +02:00
parent e1d94eee21
commit fdc5bd6195

View File

@ -49,6 +49,8 @@ int main(int argc, char *argv[])
return 1; return 1;
} }
try
{
boost::filesystem::path hsgr_path(argv[1]); boost::filesystem::path hsgr_path(argv[1]);
std::vector<QueryGraph::NodeArrayEntry> node_list; std::vector<QueryGraph::NodeArrayEntry> node_list;
@ -101,5 +103,10 @@ int main(int argc, char *argv[])
} }
m_query_graph.reset(); m_query_graph.reset();
SimpleLogger().Write() << "Data file " << argv[0] << " appears to be OK"; SimpleLogger().Write() << "Data file " << argv[0] << " appears to be OK";
}
catch (const std::exception &e)
{
SimpleLogger().Write(logWARNING) << "[exception] " << e.what();
}
return 0; return 0;
} }