diff options
author | Marius Kintel <marius@kintel.net> | 2011-12-19 14:41:11 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-12-19 14:41:11 (GMT) |
commit | 87ce149df2581361e8975bd1a0addf2b6ef61e3d (patch) | |
tree | c68db815a72cc767b6d51be0a57e9946c5f0a619 /src/CGAL_Nef_polyhedron.cc | |
parent | ba1f0b7489dd5fa9bdc8c44068040f13113b40d0 (diff) | |
parent | 638743e2201c6869b48857dd2db5ec01df665162 (diff) |
Merge branch 'master' into boost_filesystem
Conflicts:
boost.pri
tests/CMakeLists.txt
Diffstat (limited to 'src/CGAL_Nef_polyhedron.cc')
-rw-r--r-- | src/CGAL_Nef_polyhedron.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/CGAL_Nef_polyhedron.cc b/src/CGAL_Nef_polyhedron.cc index 8c65777..6ed2d90 100644 --- a/src/CGAL_Nef_polyhedron.cc +++ b/src/CGAL_Nef_polyhedron.cc @@ -71,6 +71,8 @@ int CGAL_Nef_polyhedron::weight() const This method is not const since convert_to_Polyhedron() wasn't const in earlier versions of CGAL. + + Note: Can return NULL if an error occurred */ PolySet *CGAL_Nef_polyhedron::convertToPolyset() { @@ -85,9 +87,16 @@ PolySet *CGAL_Nef_polyhedron::convertToPolyset() delete dd; } else if (this->dim == 3) { - CGAL_Polyhedron P; - this->p3->convert_to_Polyhedron(P); - ps = createPolySetFromPolyhedron(P); + CGAL::Failure_behaviour old_behaviour = CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION); + try { + CGAL_Polyhedron P; + this->p3->convert_to_Polyhedron(P); + ps = createPolySetFromPolyhedron(P); + } + catch (CGAL::Precondition_exception e) { + PRINTF("CGAL error in CGAL_Nef_polyhedron::convertToPolyset(): %s", e.what()); + } + CGAL::set_error_behaviour(old_behaviour); } return ps; } |