Fail hard if node weights are not there

This commit is contained in:
Patrick Niklaus 2016-01-21 04:00:12 +01:00
parent 439eb9da3d
commit 17f8e65808

View File

@ -93,9 +93,13 @@ int Contractor::Run()
std::vector<EdgeWeight> node_weights;
std::string node_file_name = config.osrm_input_path.string() + ".enw";
if (util::deserializeVector(node_file_name, node_weights))
{
util::SimpleLogger().Write() << "Done reading node weights.";
}
else
util::SimpleLogger().Write() << "Failed reading node weights.";
{
throw util::exception("Failed reading node weights.");
}
util::DeallocatingVector<QueryEdge> contracted_edge_list;
ContractGraph(max_edge_id, edge_based_edge_list, contracted_edge_list, std::move(node_weights),