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:
@@ -36,9 +36,9 @@ const char* BRepTools_Write (const char* theFileStr, void* theShapePtr)
|
||||
else
|
||||
return "Error: write failed";
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
catch (Standard_Failure const& anException)
|
||||
{
|
||||
return Standard_Failure::Caught()->GetMessageString();
|
||||
return anException.GetMessageString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,9 +58,9 @@ const char* BRepTools_Dump (void* theShapePtr)
|
||||
|
||||
return "Shape dumped to cout";
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
catch (Standard_Failure const& anException)
|
||||
{
|
||||
return Standard_Failure::Caught()->GetMessageString();
|
||||
return anException.GetMessageString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,9 +82,9 @@ const char* BRepTools_DumpLoc (void* theLocationPtr)
|
||||
|
||||
return "Location dumped to cout";
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
catch (Standard_Failure const& anException)
|
||||
{
|
||||
return Standard_Failure::Caught()->GetMessageString();
|
||||
return anException.GetMessageString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -126,7 +126,7 @@ Standard_Boolean BRepTools_GTrsfModification::NewSurface
|
||||
}
|
||||
}
|
||||
else{
|
||||
Standard_NoSuchObject::Raise("BRepTools_GTrsfModification : Pb no BSpline/Bezier Type Surface");
|
||||
throw Standard_NoSuchObject("BRepTools_GTrsfModification : Pb no BSpline/Bezier Type Surface");
|
||||
}
|
||||
|
||||
L.Identity();
|
||||
@@ -175,7 +175,7 @@ Standard_Boolean BRepTools_GTrsfModification::NewCurve
|
||||
}
|
||||
}
|
||||
else {
|
||||
Standard_NoSuchObject::Raise("BRepTools_GTrsfModification : Pb no BSpline/Bezier Type Curve");
|
||||
throw Standard_NoSuchObject("BRepTools_GTrsfModification : Pb no BSpline/Bezier Type Curve");
|
||||
}
|
||||
C = new Geom_TrimmedCurve(C, f, l);
|
||||
}
|
||||
|
@@ -119,7 +119,7 @@ static TopTools_IndexedMapOfShape MapE, MapF;
|
||||
void BRepTools_Modifier::Perform(const Handle(BRepTools_Modification)& M, const Handle(Message_ProgressIndicator) & aProgress)
|
||||
{
|
||||
if (myShape.IsNull()) {
|
||||
Standard_NullObject::Raise();
|
||||
throw Standard_NullObject();
|
||||
}
|
||||
#ifdef DEBUG_Modifier
|
||||
MapE.Clear(); MapF.Clear();
|
||||
|
@@ -24,7 +24,7 @@
|
||||
inline const TopoDS_Shape& BRepTools_Modifier::ModifiedShape
|
||||
(const TopoDS_Shape& S) const
|
||||
{
|
||||
if (!myMap.IsBound(S)) { Standard_NoSuchObject::Raise();}
|
||||
if (!myMap.IsBound(S)) { throw Standard_NoSuchObject();}
|
||||
return myMap(S);
|
||||
}
|
||||
|
||||
|
@@ -192,8 +192,7 @@ Standard_Boolean BRepTools_TrsfModification::NewCurve2d
|
||||
if ( gtrsf.Form() != gp_Identity) {
|
||||
NewC = GeomLib::GTransform(NewC,gtrsf);
|
||||
if (NewC.IsNull()) {
|
||||
Standard_DomainError::Raise("TrsfModification:Error in NewCurve2d");
|
||||
return Standard_False;
|
||||
throw Standard_DomainError("TrsfModification:Error in NewCurve2d");
|
||||
}
|
||||
newf = NewC->FirstParameter();
|
||||
newl = NewC->LastParameter();
|
||||
|
@@ -604,8 +604,7 @@ TopAbs_Orientation BRepTools_WireExplorer::Orientation() const
|
||||
return it.Value().Orientation();
|
||||
it.Next();
|
||||
}
|
||||
Standard_NoSuchObject::Raise("BRepTools_WireExplorer::Orientation");
|
||||
return TopAbs_FORWARD;
|
||||
throw Standard_NoSuchObject("BRepTools_WireExplorer::Orientation");
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Reference in New Issue
Block a user