#964 Catch precondition exception for malformed (self-intersecting) polygons to avoid a crash

master
Marius Kintel 2014-10-01 00:43:34 -04:00
parent 1121c96a11
commit 8eff7ed37b
1 changed files with 3 additions and 1 deletions

View File

@ -199,7 +199,9 @@ namespace PolysetUtils {
triangles.push_back( pgon );
}
}
} catch (const CGAL::Assertion_exception &e) {
} catch (const CGAL::Failure_exception &e) {
// Using failure exception to catch precondition errors for malformed polygons
// in e.g. CGAL::orientation_2().
PRINTB("CGAL error in triangulate_polygon(): %s", e.what());
err = true;
}