From fdfe0ce63d7aca65308d9c60d77dc90fccbd4931 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Mon, 9 Dec 2013 14:20:35 -0500 Subject: [PATCH] Implements #822 (partially) --- Util/ProgramOptions.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Util/ProgramOptions.h b/Util/ProgramOptions.h index 160c47938..bdabb2ddb 100644 --- a/Util/ProgramOptions.h +++ b/Util/ProgramOptions.h @@ -238,6 +238,8 @@ inline bool GenerateServerProgramOptions( !boost::filesystem::is_regular_file(path_iterator->second) ) { path_iterator->second = base_string + ".hsgr"; + } else { + throw OSRMException(base_string + ".hsgr not found"); } path_iterator = paths.find("nodesdata"); @@ -246,38 +248,52 @@ inline bool GenerateServerProgramOptions( !boost::filesystem::is_regular_file(path_iterator->second) ) { path_iterator->second = base_string + ".nodes"; + } else { + throw OSRMException(base_string + ".nodes not found"); } + path_iterator = paths.find("edgesdata"); if( path_iterator != paths.end() && !boost::filesystem::is_regular_file(path_iterator->second) ) { path_iterator->second = base_string + ".edges"; + } else { + throw OSRMException(base_string + ".edges not found"); } + path_iterator = paths.find("ramindex"); if( path_iterator != paths.end() && !boost::filesystem::is_regular_file(path_iterator->second) ) { path_iterator->second = base_string + ".ramIndex"; + } else { + throw OSRMException(base_string + ".ramIndex not found"); } + path_iterator = paths.find("fileindex"); if( path_iterator != paths.end() && !boost::filesystem::is_regular_file(path_iterator->second) ) { path_iterator->second = base_string + ".fileIndex"; + } else { + throw OSRMException(base_string + ".fileIndex not found"); } + path_iterator = paths.find("namesdata"); if( path_iterator != paths.end() && !boost::filesystem::is_regular_file(path_iterator->second) ) { path_iterator->second = base_string + ".names"; + } else { + throw OSRMException(base_string + ".namesIndex not found"); } path_iterator = paths.find("timestamp");