Remove generic std::exception handlers, they don't seem to be adding value, and they hide useful info.

This commit is contained in:
Daniel Patterson
2016-07-19 13:13:52 +02:00
committed by Patrick Niklaus
parent b4710633b1
commit 0b868969be
12 changed files with 18 additions and 89 deletions
+1 -14
View File
@@ -73,7 +73,6 @@ namespace extractor
*/
int Extractor::run(ScriptingEnvironment &scripting_environment)
{
try
{
util::LogPolicy::GetInstance().Unmute();
TIMER_START(extracting);
@@ -202,14 +201,7 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
util::SimpleLogger().Write() << "extraction finished after " << TIMER_SEC(extracting)
<< "s";
}
// we do this for scoping
// TODO move to own functions
catch (const std::exception &e)
{
util::SimpleLogger().Write(logWARNING) << e.what();
return 1;
}
try
{
// Transform the node-based graph that OSM is based on into an edge-based graph
// that is better for routing. Every edge becomes a node, and every valid
@@ -266,11 +258,6 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
util::SimpleLogger().Write() << "To prepare the data for routing, run: "
<< "./osrm-contract " << config.output_file_name << std::endl;
}
catch (const std::exception &e)
{
util::SimpleLogger().Write(logWARNING) << e.what();
return 1;
}
return 0;
}