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:
@@ -80,9 +80,9 @@ int SurfaceOfExtrusionPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
getGeomSurfaceOfExtrusionPtr()->setHandle(curve2);
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -138,9 +138,9 @@ void SurfaceOfExtrusionPy::setBasisCurve(Py::Object arg)
|
||||
(getGeometryPtr()->handle());
|
||||
curve2->SetBasisCurve(curve);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle(Standard_Failure) e = Standard_Failure::Caught();
|
||||
throw Py::Exception(e->GetMessageString());
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
throw Py::Exception(e.GetMessageString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -179,9 +179,9 @@ PyObject* SurfaceOfExtrusionPy::uIso(PyObject * args)
|
||||
c->DynamicType()->Name());
|
||||
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 0;
|
||||
}
|
||||
}
|
||||
@@ -220,9 +220,9 @@ PyObject* SurfaceOfExtrusionPy::vIso(PyObject * args)
|
||||
c->DynamicType()->Name());
|
||||
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 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user