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

@@ -164,9 +164,9 @@ int LineSegmentPy::PyInit(PyObject* args, PyObject* /*kwd*/)
return 0;
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(PartExceptionOCCError, e->GetMessageString());
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return -1;
}
catch (...) {
@@ -195,9 +195,9 @@ PyObject* LineSegmentPy::setParameterRange(PyObject *args)
(this->getGeomLineSegmentPtr()->handle());
this_curve->SetTrim(first, last);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(PartExceptionOCCError, e->GetMessageString());
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return NULL;
}
@@ -255,9 +255,9 @@ void LineSegmentPy::setStartPoint(Py::Object arg)
this_line->SetLin(that_line->Lin());
this_curv->SetTrim(that_curv->FirstParameter(), that_curv->LastParameter());
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
throw Py::Exception(e->GetMessageString());
catch (Standard_Failure& e) {
throw Py::Exception(e.GetMessageString());
}
}
@@ -312,9 +312,9 @@ void LineSegmentPy::setEndPoint(Py::Object arg)
this_line->SetLin(that_line->Lin());
this_curv->SetTrim(that_curv->FirstParameter(), that_curv->LastParameter());
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
throw Py::Exception(e->GetMessageString());
catch (Standard_Failure& e) {
throw Py::Exception(e.GetMessageString());
}
}