Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
Co-authored-by: Bob Luppes <bobluppes@gmail.com>
  • Loading branch information
unbalancedvariance and bobluppes authored Sep 24, 2023
1 parent 8713f6e commit 8af6035
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/graaflib/algorithm/shortest_path.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,7 @@ bellman_ford_shortest_paths(const graph<V, E, T>& graph,
std::numeric_limits<WEIGHT_T>::max() &&
shortest_paths[u].total_weight + weight <
shortest_paths[v].total_weight) {
std::ostringstream error_msg;
error_msg << "Negative cycle detected in the graph.";
throw std::invalid_argument{error_msg.str()};
throw std::invalid_argument{"Negative cycle detected in the graph."};
}
}
return shortest_paths;
Expand Down

0 comments on commit 8af6035

Please sign in to comment.