mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40: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:
@@ -53,7 +53,7 @@ Standard_Boolean BRepBuilderAPI_Command::IsDone()const
|
||||
void BRepBuilderAPI_Command::Check()const
|
||||
{
|
||||
if (!myDone)
|
||||
StdFail_NotDone::Raise("BRep_API: command not done");
|
||||
throw StdFail_NotDone("BRep_API: command not done");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -83,7 +83,7 @@ static Handle(Geom2d_Curve)
|
||||
const Standard_Boolean theIsReverse = Standard_False)
|
||||
{
|
||||
if((theIndex < 0) || (theIndex > 3))
|
||||
Standard_OutOfRange::Raise("BRepBuilderAPI_FastSewing.cxx, Get2DCurve(): OUT of Range");
|
||||
throw Standard_OutOfRange("BRepBuilderAPI_FastSewing.cxx, Get2DCurve(): OUT of Range");
|
||||
|
||||
Handle(Geom2d_Curve) a2dCurv;
|
||||
|
||||
@@ -677,7 +677,7 @@ void BRepBuilderAPI_FastSewing::FS_Edge::
|
||||
a3dCurv = aSurf->UIso(aUf);
|
||||
break;
|
||||
default:
|
||||
Standard_OutOfRange::Raise("FS_Edge::CreateTopologicalEdge()");
|
||||
throw Standard_OutOfRange("FS_Edge::CreateTopologicalEdge()");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -72,7 +72,7 @@ BRepBuilderAPI_ModifyShape::BRepBuilderAPI_ModifyShape
|
||||
void BRepBuilderAPI_ModifyShape::DoModif ()
|
||||
{
|
||||
if (myInitialShape.IsNull() || myModification.IsNull()) {
|
||||
Standard_NullObject::Raise();
|
||||
throw Standard_NullObject();
|
||||
}
|
||||
myModifier.Perform(myModification);
|
||||
if (myModifier.IsDone()) {
|
||||
|
@@ -149,11 +149,12 @@ Handle(Geom2d_Curve) BRepBuilderAPI_Sewing::SameRange(const Handle(Geom2d_Curve)
|
||||
GeomLib::SameRange(Precision::PConfusion(),CurvePtr,FirstOnCurve,LastOnCurve,
|
||||
RequestedFirst,RequestedLast,NewCurvePtr);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Exception in BRepBuilderAPI_Sewing::SameRange: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
anException.Print(cout); cout << endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
}
|
||||
return NewCurvePtr;
|
||||
}
|
||||
@@ -321,11 +322,12 @@ void BRepBuilderAPI_Sewing::SameParameter(const TopoDS_Edge& edge) const
|
||||
|
||||
BRepLib::SameParameter(edge);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Exception in BRepBuilderAPI_Sewing::SameParameter: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
anException.Print(cout); cout << endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4348,12 +4350,13 @@ void BRepBuilderAPI_Sewing::ProjectPointsOnCurve(const TColgp_Array1OfPnt& arrPn
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
worktol = MinTolerance();
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Exception in BRepBuilderAPI_Sewing::ProjectPointsOnCurve: ";
|
||||
Standard_Failure::Caught()->Print(cout); cout << endl;
|
||||
anException.Print(cout); cout << endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
worktol = MinTolerance();
|
||||
}
|
||||
if (!isProjected && isConsiderEnds) {
|
||||
if (Min(distF2,distL2) < worktol * worktol) {
|
||||
|
Reference in New Issue
Block a user