Skip to content

Commit

Permalink
Use SFCGAL Exception instead of std exception and add a message
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti committed Oct 10, 2023
1 parent 3ed68b8 commit 59842f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/algorithm/visibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ visibility(const Geometry &polygon, const Geometry &point, NoValidityCheck)
while (cont) {
he++;
if (he == arr.halfedges_end()) {
throw(std::exception());
BOOST_THROW_EXCEPTION(
Exception("Can not find corresponding half edge."));
}

cont = !Segment_2(he->source()->point(), he->target()->point())
Expand Down Expand Up @@ -178,7 +179,7 @@ visibility(const Geometry &polygon, const Geometry &pointA,
he->target()->point() != endPoint) {
he++;
if (he == arr.halfedges_end()) {
throw(std::exception());
BOOST_THROW_EXCEPTION(Exception("Can not find corresponding half edge."));
}
}

Expand Down

0 comments on commit 59842f2

Please sign in to comment.