1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +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

@@ -547,12 +547,14 @@ Standard_Boolean ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge,
B.Range(edge, G3dCFirst, G3dCLast, Standard_True);
}
} // end try
catch(Standard_Failure) {
myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL2);
#ifdef OCCT_DEBUG //:s5
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
//:s5
cout << "Warning: ShapeFix_Edge::FixAddPCurve(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL2);
}
myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_DONE1);
return Standard_True;
@@ -775,12 +777,12 @@ Standard_Boolean ShapeFix_Edge::FixSameParameter(const TopoDS_Edge& edge,
if ( ! SP ) myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
}
}
catch(Standard_Failure)
{
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "\nWarning: ShapeFix_Edge: Exception in SameParameter: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
}
}

View File

@@ -209,11 +209,13 @@ static Standard_Boolean FindParameterWithExt (const gp_Pnt& Pt1,
}
else return Standard_False;
} // end try
catch(Standard_Failure) {
#ifdef OCCT_DEBUG //:s5
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
//:s5
cout << "Warning: ShapeFix_EdgeProjAux, FindParameterWithExt(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
return Standard_False;
}
}

View File

@@ -219,11 +219,12 @@ static void CollectSolids(const TopTools_SequenceOfShape& aSeqShells ,
}
}
}
catch(Standard_Failure) {
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeFix_Solid::SolidFromShell: Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
continue;
}
}
@@ -296,11 +297,12 @@ static Standard_Boolean CreateSolids(const TopoDS_Shape theShape,TopTools_Indexe
bsc3d.PerformInfinitePoint(Precision::Confusion());
infinstatus = bsc3d.State();
}
catch(Standard_Failure) {
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeFix_Solid::SolidFromShell: Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
ShellSolid.Add(aShell,aSolid);
continue;
}
@@ -572,11 +574,12 @@ TopoDS_Solid ShapeFix_Solid::SolidFromShell (const TopoDS_Shell& shell)
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE2 );
}
}
catch(Standard_Failure) {
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeFix_Solid::SolidFromShell: Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
return solid;
}
return solid;

View File

@@ -365,12 +365,12 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
else tc = new Geom_TrimmedCurve(c,first,last);
bsp = GeomConvert::CurveToBSplineCurve(tc);
}
catch (Standard_Failure)
{
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeFix_Wire_1::FixGap3d: Exception in TrimmedCurve" <<first<<" " <<last<<endl;
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
}
}
@@ -640,12 +640,12 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
}
}
}
catch (Standard_Failure)
{
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeFix_Wire_1::FixGap3d: Exception in TrimmedCurve :"<<endl;
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
}
}
}
@@ -948,12 +948,12 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
c = new Geom2d_TrimmedCurve(pc,first,last);
bsp = Geom2dConvert::CurveToBSplineCurve(c);
}
catch (Standard_Failure)
{
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeFix_Wire_1::FixGap2d: Exception in TrimmedCurve2d" <<first<<" " <<last<<endl;
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
}
}
@@ -1527,13 +1527,12 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
}
}
}
catch (Standard_Failure)
{
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeFix_Wire_1::FixGap2d: Exception in TrimmedCurve2d :"<<endl;
Standard_Failure::Caught()->Print(cout); cout << endl;
anException.Print(cout); cout << endl;
#endif
(void)anException;
}
}
}

View File

@@ -390,12 +390,12 @@ ShapeFix_Wireframe::ShapeFix_Wireframe(const TopoDS_Shape& shape)
E3 = newedge;
return ReplaceFirst;
}
catch ( Standard_Failure )
{
catch ( Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout<<"Error: ShapeFix_Wireframe::FixSmallEdges: JoinEdges: Exception in GeomConvert_CompCurveToBSplineCurve: ";
Standard_Failure::Caught()->Print(cout); cout<<endl;
anException.Print(cout); cout<<endl;
#endif
(void)anException;
return ReplaceFirst;
}
}