catch an uncaught exception and give git revision in springclean tool
This commit is contained in:
parent
be11d3325d
commit
4fbefaef9a
@ -286,7 +286,7 @@ if(WITH_TOOLS OR BUILD_TOOLS)
|
||||
endif()
|
||||
add_executable(osrm-check-hsgr Tools/check-hsgr.cpp $<TARGET_OBJECTS:FINGERPRINT> $<TARGET_OBJECTS:LOGGER>)
|
||||
target_link_libraries(osrm-check-hsgr ${Boost_LIBRARIES})
|
||||
add_executable(osrm-springclean Tools/springclean.cpp $<TARGET_OBJECTS:FINGERPRINT> $<TARGET_OBJECTS:LOGGER>)
|
||||
add_executable(osrm-springclean Tools/springclean.cpp $<TARGET_OBJECTS:FINGERPRINT> $<TARGET_OBJECTS:LOGGER> $<TARGET_OBJECTS:GITDESCRIPTION>)
|
||||
target_link_libraries(osrm-springclean ${Boost_LIBRARIES})
|
||||
|
||||
install(TARGETS osrm-cli DESTINATION bin)
|
||||
|
@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "../DataStructures/SharedMemoryFactory.h"
|
||||
#include "../Server/DataStructures/SharedDataType.h"
|
||||
#include "../Util/GitDescription.h"
|
||||
#include "../Util/simple_logger.hpp"
|
||||
|
||||
void delete_region(const SharedDataType region)
|
||||
@ -74,6 +75,11 @@ void springclean()
|
||||
int main()
|
||||
{
|
||||
LogPolicy::GetInstance().Unmute();
|
||||
try
|
||||
{
|
||||
SimpleLogger().Write() << "starting up engines, " << g_GIT_DESCRIPTION << ", "
|
||||
<< "compiled at " << __DATE__ << ", " __TIME__ << "\n\n";
|
||||
SimpleLogger().Write() << "Releasing all locks";
|
||||
SimpleLogger().Write() << "ATTENTION! BE CAREFUL!";
|
||||
SimpleLogger().Write() << "----------------------";
|
||||
SimpleLogger().Write() << "This tool may put osrm-routed into an undefined state!";
|
||||
@ -87,5 +93,10 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
springclean();
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
SimpleLogger().Write(logWARNING) << "[excpetion] " << e.what();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user