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

@@ -138,11 +138,11 @@ MeasureType Measurement::getType()
try {
refSubShape = refShape.getSubShape((*subEl).c_str());
}
catch (Standard_Failure) {
catch (Standard_Failure& e) {
std::stringstream errorMsg;
Handle(Standard_Failure) e = Standard_Failure::Caught();
errorMsg << "Measurement - getType - " << e->GetMessageString() << std::endl;
throw Base::Exception(e->GetMessageString());
errorMsg << "Measurement - getType - " << e.GetMessageString() << std::endl;
throw Base::Exception(e.GetMessageString());
}
switch (refSubShape.ShapeType()) {
@@ -221,9 +221,9 @@ TopoDS_Shape Measurement::getShape(App::DocumentObject *obj , const char *subNam
try {
refSubShape = refShape.getSubShape(subName);
}
catch (Standard_Failure) {
Handle(Standard_Failure) e = Standard_Failure::Caught();
throw Base::Exception(e->GetMessageString());
catch (Standard_Failure& e) {
throw Base::Exception(e.GetMessageString());
}
return refSubShape;
}