Changed all catch types to references for polymorphic exceptions.

This commit is contained in:
Markus Lampert
2018-07-30 10:28:54 -07:00
committed by wmayer
parent 1a6fd6b048
commit e13c09235f
53 changed files with 98 additions and 98 deletions

View File

@@ -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.");
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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