Port to occ7.2:

+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
This commit is contained in:
wmayer
2017-09-01 14:16:24 +02:00
parent 5aa60a4d3b
commit 949c86d364
96 changed files with 1497 additions and 1714 deletions

View File

@@ -163,9 +163,9 @@ Py::Float TopoShapeVertexPy::getX(void) const
const TopoDS_Vertex& v = TopoDS::Vertex(getTopoShapePtr()->getShape());
return Py::Float(BRep_Tool::Pnt(v).X());
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
throw Py::RuntimeError(e->GetMessageString());
catch (Standard_Failure& e) {
throw Py::RuntimeError(e.GetMessageString());
}
}
@@ -175,9 +175,9 @@ Py::Float TopoShapeVertexPy::getY(void) const
const TopoDS_Vertex& v = TopoDS::Vertex(getTopoShapePtr()->getShape());
return Py::Float(BRep_Tool::Pnt(v).Y());
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
throw Py::RuntimeError(e->GetMessageString());
catch (Standard_Failure& e) {
throw Py::RuntimeError(e.GetMessageString());
}
}
@@ -187,9 +187,9 @@ Py::Float TopoShapeVertexPy::getZ(void) const
const TopoDS_Vertex& v = TopoDS::Vertex(getTopoShapePtr()->getShape());
return Py::Float(BRep_Tool::Pnt(v).Z());
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
throw Py::RuntimeError(e->GetMessageString());
catch (Standard_Failure& e) {
throw Py::RuntimeError(e.GetMessageString());
}
}
@@ -200,9 +200,9 @@ Py::Object TopoShapeVertexPy::getPoint(void) const
gp_Pnt p = BRep_Tool::Pnt(v);
return Py::asObject(new Base::VectorPy(new Base::Vector3d(p.X(),p.Y(),p.Z())));
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
throw Py::RuntimeError(e->GetMessageString());
catch (Standard_Failure& e) {
throw Py::RuntimeError(e.GetMessageString());
}
}