Skip to content

Commit

Permalink
Part: [skip ci] handle OCCT exception in GeomBSplineCurve::copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Oct 30, 2020
1 parent aebf568 commit 5344161
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Mod/Part/App/Geometry.cpp
Expand Up @@ -1064,9 +1064,14 @@ const Handle(Geom_Geometry)& GeomBSplineCurve::handle() const

Geometry *GeomBSplineCurve::copy(void) const
{
GeomBSplineCurve *newCurve = new GeomBSplineCurve(myCurve);
newCurve->Construction = this->Construction;
return newCurve;
try {
GeomBSplineCurve *newCurve = new GeomBSplineCurve(myCurve);
newCurve->Construction = this->Construction;
return newCurve;
}
catch (Standard_Failure& e) {
THROWM(Base::CADKernelError, e.GetMessageString())
}
}

int GeomBSplineCurve::countPoles() const
Expand All @@ -1089,7 +1094,6 @@ void GeomBSplineCurve::setPole(int index, const Base::Vector3d& pole, double wei
myCurve->SetPole(index,pnt,weight);
}
catch (Standard_Failure& e) {

THROWM(Base::CADKernelError,e.GetMessageString())
}
}
Expand Down

0 comments on commit 5344161

Please sign in to comment.