diff --git a/CDT/include/CDTUtils.hpp b/CDT/include/CDTUtils.hpp index 443b828..001098a 100644 --- a/CDT/include/CDTUtils.hpp +++ b/CDT/include/CDTUtils.hpp @@ -164,6 +164,7 @@ CDT_INLINE_IF_HEADER_ONLY Index opoNbr(const Index vertIndex) if(vertIndex == Index(2)) return Index(0); assert(false && "Invalid vertex index"); + throw std::runtime_error("Invalid vertex index"); } CDT_INLINE_IF_HEADER_ONLY Index opoVrt(const Index neighborIndex) @@ -175,6 +176,7 @@ CDT_INLINE_IF_HEADER_ONLY Index opoVrt(const Index neighborIndex) if(neighborIndex == Index(2)) return Index(1); assert(false && "Invalid neighbor index"); + throw std::runtime_error("Invalid neighbor index"); } CDT_INLINE_IF_HEADER_ONLY Index diff --git a/CDT/include/Triangulation.hpp b/CDT/include/Triangulation.hpp index 5dbcc61..0a86a29 100644 --- a/CDT/include/Triangulation.hpp +++ b/CDT/include/Triangulation.hpp @@ -764,7 +764,7 @@ void Triangulation::conformToEdgeIteration( { // make sure to report original input edges in the exception Edge e1 = pieceToOriginals.count(edge) - ? pieceToOriginals[e1].front() + ? pieceToOriginals[edge].front() : edge; Edge e2(iVleft, iVright); e2 = pieceToOriginals.count(e2) ? pieceToOriginals[e2].front()