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:
@@ -82,9 +82,9 @@ App::DocumentObjectExecReturn *Feature::recompute(void)
|
||||
try {
|
||||
return App::GeoFeature::recompute();
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle(Standard_Failure) e = Standard_Failure::Caught();
|
||||
App::DocumentObjectExecReturn* ret = new App::DocumentObjectExecReturn(e->GetMessageString());
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
App::DocumentObjectExecReturn* ret = new App::DocumentObjectExecReturn(e.GetMessageString());
|
||||
if (ret->Why.empty()) ret->Why = "Unknown OCC exception";
|
||||
return ret;
|
||||
}
|
||||
@@ -116,9 +116,9 @@ std::vector<PyObject *> Feature::getPySubObjects(const std::vector<std::string>&
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle(Standard_Failure) e = Standard_Failure::Caught();
|
||||
throw Py::ValueError(e->GetMessageString());
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
throw Py::ValueError(e.GetMessageString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user