diff --git a/poly2tri/sweep/sweep.cc b/poly2tri/sweep/sweep.cc index 778d4f0..1f51fee 100644 --- a/poly2tri/sweep/sweep.cc +++ b/poly2tri/sweep/sweep.cc @@ -123,8 +123,7 @@ void Sweep::EdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* triangl triangle = &triangle->NeighborAcross(point); EdgeEvent( tcx, ep, *p1, triangle, *p1 ); } else { - std::runtime_error("EdgeEvent - collinear points not supported"); - assert(0); + throw std::runtime_error("EdgeEvent - collinear points not supported"); } return; } @@ -140,8 +139,7 @@ void Sweep::EdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* triangl triangle = &triangle->NeighborAcross(point); EdgeEvent( tcx, ep, *p2, triangle, *p2 ); } else { - std::runtime_error("EdgeEvent - collinear points not supported"); - assert(0); + throw std::runtime_error("EdgeEvent - collinear points not supported"); } return; }