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
-5
View File
@@ -228,8 +228,3 @@ int main(int argc, char *argv[]) try
osrm::util::SimpleLogger().Write() << "finished component analysis";
return EXIT_SUCCESS;
}
catch (const std::exception &e)
{
osrm::util::SimpleLogger().Write(logWARNING) << "[exception] " << e.what();
return EXIT_FAILURE;
}
-5
View File
@@ -162,8 +162,3 @@ catch (const std::bad_alloc &e)
<< "Please provide more memory or consider using a larger swapfile";
return EXIT_FAILURE;
}
catch (const std::exception &e)
{
util::SimpleLogger().Write(logWARNING) << "[exception] " << e.what();
return EXIT_FAILURE;
}
-5
View File
@@ -161,8 +161,3 @@ catch (const std::bad_alloc &e)
<< "Please provide more memory or consider using a larger swapfile";
return EXIT_FAILURE;
}
catch (const std::exception &e)
{
util::SimpleLogger().Write(logWARNING) << "[exception] " << e.what();
return EXIT_FAILURE;
}
+1 -12
View File
@@ -49,7 +49,7 @@ void runStatistics(std::vector<double> &timings_vector, Statistics &stats)
boost::filesystem::path test_path;
int main(int argc, char *argv[]) try
int main(int argc, char *argv[])
{
#ifdef __FreeBSD__
@@ -312,14 +312,3 @@ int main(int argc, char *argv[]) try
return EXIT_SUCCESS;
#endif
}
catch (const std::exception &e)
{
osrm::util::SimpleLogger().Write(logWARNING) << "caught exception: " << e.what();
osrm::util::SimpleLogger().Write(logWARNING) << "cleaning up, and exiting";
if (boost::filesystem::exists(test_path))
{
boost::filesystem::remove(test_path);
osrm::util::SimpleLogger().Write(logWARNING) << "removing temporary files";
}
return EXIT_FAILURE;
}
-5
View File
@@ -371,8 +371,3 @@ catch (const std::bad_alloc &e)
<< "Please provide more memory or consider using a larger swapfile";
return EXIT_FAILURE;
}
catch (const std::exception &e)
{
util::SimpleLogger().Write(logWARNING) << "[exception] " << e.what();
return EXIT_FAILURE;
}
+1 -6
View File
@@ -53,7 +53,7 @@ void springclean()
}
}
int main() try
int main()
{
osrm::util::LogPolicy::GetInstance().Unmute();
osrm::util::SimpleLogger().Write() << "Releasing all locks";
@@ -74,8 +74,3 @@ int main() try
osrm::tools::springclean();
return EXIT_SUCCESS;
}
catch (const std::exception &e)
{
osrm::util::SimpleLogger().Write(logWARNING) << "[excpetion] " << e.what();
return EXIT_FAILURE;
}
-5
View File
@@ -99,8 +99,3 @@ catch (const std::bad_alloc &e)
"address space (note: this makes OSRM swap, i.e. slow)";
return EXIT_FAILURE;
}
catch (const std::exception &e)
{
util::SimpleLogger().Write(logWARNING) << "caught exception: " << e.what();
return EXIT_FAILURE;
}
+1 -6
View File
@@ -3,7 +3,7 @@
#include <iostream>
int main() try
int main()
{
osrm::util::LogPolicy::GetInstance().Unmute();
osrm::util::SimpleLogger().Write() << "Releasing all locks";
@@ -13,8 +13,3 @@ int main() try
barrier.update_mutex.unlock();
return 0;
}
catch (const std::exception &e)
{
osrm::util::SimpleLogger().Write(logWARNING) << "[excpetion] " << e.what();
return EXIT_FAILURE;
}