Throw error if edge based graph file could not be loaded

This commit is contained in:
Daniel J. Hofmann 2016-05-16 14:20:43 -04:00 committed by Patrick Niklaus
parent 95ca6ebdaa
commit 6ae559b42b
No known key found for this signature in database
GPG Key ID: E426891B5F978B1B

View File

@ -152,6 +152,8 @@ std::size_t Contractor::LoadEdgeExpandedGraph(
{ {
util::SimpleLogger().Write() << "Opening " << edge_based_graph_filename; util::SimpleLogger().Write() << "Opening " << edge_based_graph_filename;
boost::filesystem::ifstream input_stream(edge_based_graph_filename, std::ios::binary); boost::filesystem::ifstream input_stream(edge_based_graph_filename, std::ios::binary);
if (!input_stream)
throw util::exception("Could not load edge based graph file");
const bool update_edge_weights = !segment_speed_filenames.empty(); const bool update_edge_weights = !segment_speed_filenames.empty();
const bool update_turn_penalties = !turn_penalty_filenames.empty(); const bool update_turn_penalties = !turn_penalty_filenames.empty();