Changed all catch types to references for polymorphic exceptions.
This commit is contained in:
@@ -492,7 +492,7 @@ void Pipe::buildPipePath(const Part::TopoShape& shape, const std::vector< std::s
|
||||
throw Base::Exception("Spine is neither an edge nor a wire.");
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
throw Base::Exception("Invalid spine.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ TopoDS_Shape FeaturePrimitive::refineShapeIfActive(const TopoDS_Shape& oldShape)
|
||||
TopoDS_Shape resShape = mkRefine.Shape();
|
||||
return resShape;
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
return oldShape;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -757,7 +757,7 @@ void ProfileBased::remapSupportShape(const TopoDS_Shape& newShape)
|
||||
try {
|
||||
element = shape.getSubShape(it->c_str());
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
// This shape doesn't even exist, so no chance to do some tests
|
||||
newSubValues.push_back(*it);
|
||||
continue;
|
||||
@@ -770,7 +770,7 @@ void ProfileBased::remapSupportShape(const TopoDS_Shape& newShape)
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
}
|
||||
// try an exact matching
|
||||
if (!success) {
|
||||
@@ -1051,7 +1051,7 @@ TopoDS_Shape ProfileBased::refineShapeIfActive(const TopoDS_Shape& oldShape) con
|
||||
TopoDS_Shape resShape = mkRefine.Shape();
|
||||
return resShape;
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
return oldShape;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ TopoDS_Shape Transformed::refineShapeIfActive(const TopoDS_Shape& oldShape) cons
|
||||
TopoDS_Shape resShape = mkRefine.Shape();
|
||||
return resShape;
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure&) {
|
||||
return oldShape;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ bool ReferenceSelection::allow(App::Document* pDoc, App::DocumentObject* pObj, c
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (const Base::Exception)
|
||||
} catch (const Base::Exception&)
|
||||
{ }
|
||||
}
|
||||
return false; // The Plane/Axis doesn't fits our needs
|
||||
|
||||
Reference in New Issue
Block a user