1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-13 14:27:08 +03:00

0026937: Eliminate NO_CXX_EXCEPTION macro support

Macro NO_CXX_EXCEPTION was removed from code.
Method Raise() was replaced by explicit throw statement.
Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer.
Method Standard_Failure::Caught() is deprecated now.
Eliminated empty constructors.
Updated samples.
Eliminate empty method ChangeValue from NCollection_Map class.
Removed not operable methods from NCollection classes.
This commit is contained in:
ski
2017-02-02 16:35:21 +03:00
committed by apn
parent 0c63f2f8b9
commit 9775fa6110
1146 changed files with 4860 additions and 6183 deletions

View File

@@ -80,11 +80,12 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
}
}
}
catch (Standard_Failure) {
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
return Standard_False;
}
}
@@ -116,11 +117,12 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
Curve2d = theSegments2d->Value(1);
}
}
catch (Standard_Failure) {
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
return Standard_False;
}
}
@@ -153,11 +155,12 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
Curve2dR = theSegments2d->Value(1);
}
}
catch (Standard_Failure) {
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
return Standard_False;
}
}

View File

@@ -220,12 +220,13 @@ Standard_Boolean ShapeUpgrade_ShapeDivide::Perform(const Standard_Boolean newCon
}
}
}
catch (Standard_Failure) {
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "\nError: Exception in ShapeUpgrade_FaceDivide::Perform(): ";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
}
}
}

View File

@@ -174,11 +174,12 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
else if (myCurve->IsKind (STANDARD_TYPE (Geom2d_BezierCurve)))
Handle(Geom2d_BezierCurve)::DownCast(theNewCurve)->Segment (First, Last);
}
catch (Standard_Failure) {
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeUpgrade_Split2dCurve::Build(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
theNewCurve = new Geom2d_TrimmedCurve(Handle(Geom2d_Curve)::DownCast(myCurve->Copy()),First,Last);
}
myResultingCurves->SetValue (1, theNewCurve);
@@ -227,11 +228,12 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d()
Handle(Geom2d_BezierCurve)::DownCast(theNewCurve)->Segment (Firstt, Lastt);
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
}
catch (Standard_Failure) {
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeUpgrade_Split2dCurve::Build(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
theNewCurve = new Geom2d_TrimmedCurve(Handle(Geom2d_Curve)::DownCast(myCurve->Copy()),Firstt,Lastt);
}
}

View File

@@ -250,11 +250,12 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d()
Handle(Geom_BezierCurve)::DownCast(theNewCurve)->Segment (Firstt, Lastt);
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
}
catch (Standard_Failure) {
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeUpgrade_Split3dCurve::Build(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
theNewCurve = new Geom_TrimmedCurve(Handle(Geom_Curve)::DownCast(myCurve->Copy()),Firstt,Lastt);
}
}

View File

@@ -437,11 +437,12 @@ void ShapeUpgrade_SplitSurface::Build(const Standard_Boolean Segment)
}
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
}
catch (Standard_Failure) {
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeUpgrade_SplitSurface::Build(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
Handle(Geom_Surface) theNewSurf = theNew;
theNew = new Geom_RectangularTrimmedSurface(theNewSurf,U1,U2,V1,V2);
}