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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user