mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -970,7 +970,7 @@ static Standard_Integer scalexyz(Draw_Interpretor& /*di*/, Standard_Integer n, c
|
||||
aGTrsf.SetVectorialPart(rot);
|
||||
BRepBuilderAPI_GTransform aBRepGTrsf (aShapeBase, aGTrsf, Standard_False);
|
||||
if (!aBRepGTrsf.IsDone())
|
||||
Standard_ConstructionError::Raise("Scaling not done");
|
||||
throw Standard_ConstructionError("Scaling not done");
|
||||
TopoDS_Shape Result = aBRepGTrsf.Shape();
|
||||
|
||||
DBRep::Set(a[1], Result);
|
||||
|
@@ -1000,9 +1000,9 @@ static Standard_Integer checkshape(Draw_Interpretor& theCommands,
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
catch(Standard_Failure const& anException) {
|
||||
theCommands<<"checkshape exception : ";
|
||||
theCommands << Standard_Failure::Caught()->GetMessageString();
|
||||
theCommands << anException.GetMessageString();
|
||||
theCommands<<"\n";
|
||||
return 1;
|
||||
}
|
||||
|
@@ -204,13 +204,13 @@ static Standard_Integer plate (Draw_Interpretor & di,Standard_Integer n,const ch
|
||||
DBRep::Set(name, E);
|
||||
MW.Add(E);
|
||||
if (MW.IsDone()==Standard_False) {
|
||||
Standard_Failure::Raise("mkWire is over ");
|
||||
throw Standard_Failure("mkWire is over ");
|
||||
}
|
||||
|
||||
}
|
||||
TopoDS_Wire W;
|
||||
W=MW.Wire();
|
||||
if (!(W.Closed())) Standard_Failure::Raise("Wire is not closed");
|
||||
if (!(W.Closed())) throw Standard_Failure("Wire is not closed");
|
||||
BRepBuilderAPI_MakeFace MF(Henri.Surface(),W,Standard_True);
|
||||
DBRep::Set(a[1],MF.Face());
|
||||
return 0;
|
||||
@@ -437,12 +437,12 @@ static Standard_Integer approxplate (Draw_Interpretor & di,Standard_Integer n,co
|
||||
BRepLib::BuildCurve3d(E);
|
||||
MW.Add(E);
|
||||
if (MW.IsDone()==Standard_False) {
|
||||
Standard_Failure::Raise("mkWire is over ");
|
||||
throw Standard_Failure("mkWire is over ");
|
||||
}
|
||||
}
|
||||
TopoDS_Wire W;
|
||||
W=MW.Wire();
|
||||
if (!(W.Closed())) Standard_Failure::Raise("Wire is not closed");
|
||||
if (!(W.Closed())) throw Standard_Failure("Wire is not closed");
|
||||
BRepBuilderAPI_MakeFace MF(support,W,Standard_True);
|
||||
DBRep::Set(a[1],MF.Face());
|
||||
|
||||
|
Reference in New Issue
Block a user