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

@@ -700,9 +700,8 @@ PyObject* FemMeshPy::getFacesByFace(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
catch (Standard_Failure& e) {
PyErr_SetString(Base::BaseExceptionFreeCADError, e.GetMessageString());
return 0;
}
}
@@ -733,9 +732,8 @@ PyObject* FemMeshPy::getVolumesByFace(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
catch (Standard_Failure& e) {
PyErr_SetString(Base::BaseExceptionFreeCADError, e.GetMessageString());
return 0;
}
}
@@ -766,9 +764,8 @@ PyObject* FemMeshPy::getccxVolumesByFace(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
catch (Standard_Failure& e) {
PyErr_SetString(Base::BaseExceptionFreeCADError, e.GetMessageString());
return 0;
}
}
@@ -813,9 +810,8 @@ PyObject* FemMeshPy::getNodesBySolid(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
catch (Standard_Failure& e) {
PyErr_SetString(Base::BaseExceptionFreeCADError, e.GetMessageString());
return 0;
}
}
@@ -841,9 +837,8 @@ PyObject* FemMeshPy::getNodesByFace(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
catch (Standard_Failure& e) {
PyErr_SetString(Base::BaseExceptionFreeCADError, e.GetMessageString());
return 0;
}
}
@@ -869,9 +864,8 @@ PyObject* FemMeshPy::getNodesByEdge(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
catch (Standard_Failure& e) {
PyErr_SetString(Base::BaseExceptionFreeCADError, e.GetMessageString());
return 0;
}
}
@@ -897,9 +891,8 @@ PyObject* FemMeshPy::getNodesByVertex(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
catch (Standard_Failure& e) {
PyErr_SetString(Base::BaseExceptionFreeCADError, e.GetMessageString());
return 0;
}
}
@@ -919,9 +912,8 @@ PyObject* FemMeshPy::getElementNodes(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
catch (Standard_Failure& e) {
PyErr_SetString(Base::BaseExceptionFreeCADError, e.GetMessageString());
return 0;
}
}