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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user