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");