Skip to content

Commit

Permalink
[tsp][C++] fixing throw
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Jul 28, 2021
1 parent f7596f7 commit 0c83362
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/tsp/tsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,9 @@ TSP::get_boost_vertex(int64_t id) const {
try {
return id_to_V.at(id);
} catch (...) {
pgassert(false);
throw;
throw std::make_pair(
std::string("INTERNAL: something went wrong when getting the vertex descriptor"),
std::string(__PRETTY_FUNCTION__));
}
}

Expand All @@ -488,8 +489,9 @@ TSP::get_vertex_id(V v) const {
try {
return V_to_id.at(v);
} catch (...) {
pgassert(false);
throw;
throw std::make_pair(
std::string("INTERNAL: something went wrong when getting the vertex id"),
std::string(__PRETTY_FUNCTION__));
}
}

Expand All @@ -498,6 +500,9 @@ TSP::get_edge_id(E e) const {
try {
return E_to_id.at(e);
} catch (...) {
throw std::make_pair(
std::string("INTERNAL: something went wrong when getting the edge id"),
std::string(__PRETTY_FUNCTION__));
pgassert(false);
throw;
}
Expand Down

0 comments on commit 0c83362

Please sign in to comment.