1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +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

@@ -1948,13 +1948,9 @@ static Standard_Integer DNaming_TestSingle (Draw_Interpretor& theDI,
isSelected = MakeXSelection(auxObj, aCurShape, aCntObj, Geometry, Orientation);
}
}
catch (Standard_Failure) {
Handle(Standard_Failure) aFailure = Standard_Failure::Caught();
catch (Standard_Failure const& anException) {
cout << "%%%INFO:Error: ::TestSingleSelection failed :";
if (!aFailure.IsNull())
cout << aFailure->GetMessageString() << endl;
else
cout << "%%%INFO:Error: ::TestSingleSelection : Standard_Failure with null caught failure"<< endl;
cout << anException.GetMessageString() << endl;
}
catch(...) {
cout << "%%%INFO:Error: ::TestSingleSelection selection failed : unknown exception type";
@@ -2086,13 +2082,9 @@ static Standard_Integer DNaming_Multiple (Draw_Interpretor& theDI,
isSelected = MakeXSelection(auxObj, aCurShape, aCntObj, Geometry, Orientation);
}
}
catch (Standard_Failure) {
Handle(Standard_Failure) aFailure = Standard_Failure::Caught();
catch (Standard_Failure const& anException) {
cout << "%%%INFO:Error: ::TestSingleSelection failed :";
if (!aFailure.IsNull())
cout << aFailure->GetMessageString() << endl;
else
cout << "%%%INFO:Error: ::TestSingleSelection : Standard_Failure with null caught failure"<< endl;
cout << anException.GetMessageString() << endl;
}
catch(...) {
cout << "%%%INFO:Error: ::TestSingleSelection selection failed : unknown exception type";

View File

@@ -139,7 +139,7 @@ Standard_Integer DNaming_TransformationDriver::Execute(Handle(TFunction_Logbook)
Handle(TDataStd_UAttribute) aLineObj = DNaming::GetObjectArg(aFunction, PTRANSF_LINE);
Handle(TNaming_NamedShape) aLineNS = DNaming::GetObjectValue(aLineObj);
gp_Ax1 anAxis;
if(!DNaming::ComputeAxis(aLineNS, anAxis)) Standard_Failure::Raise();
if(!DNaming::ComputeAxis(aLineNS, anAxis)) throw Standard_Failure();
gp_Vec aVector(anAxis.Direction());
aVector.Normalize();
Standard_Real anOffset = DNaming::GetReal(aFunction,PTRANSF_OFF)->Get();
@@ -150,7 +150,7 @@ Standard_Integer DNaming_TransformationDriver::Execute(Handle(TFunction_Logbook)
Handle(TDataStd_UAttribute) aLineObj = DNaming::GetObjectArg(aFunction, PTRANSF_LINE);
Handle(TNaming_NamedShape) aLineNS = DNaming::GetObjectValue(aLineObj);
gp_Ax1 anAxis;
if(!DNaming::ComputeAxis(aLineNS, anAxis)) Standard_Failure::Raise();
if(!DNaming::ComputeAxis(aLineNS, anAxis)) throw Standard_Failure();
Standard_Real anAngle = DNaming::GetReal(aFunction,PTRANSF_ANG)->Get();
aTransformation.SetRotation(anAxis, anAngle);
@@ -159,11 +159,11 @@ Standard_Integer DNaming_TransformationDriver::Execute(Handle(TFunction_Logbook)
Handle(TNaming_NamedShape) aNS = DNaming::GetObjectValue(aPlaneObj);
if(aNS.IsNull() || aNS->IsEmpty() || aNS->Get().IsNull() ||
aNS->Get().ShapeType() != TopAbs_FACE) Standard_Failure::Raise();
aNS->Get().ShapeType() != TopAbs_FACE) throw Standard_Failure();
TopoDS_Face aFace = TopoDS::Face(aNS->Get());
Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
GeomLib_IsPlanarSurface isPlanarSurface (aSurf);
if(!isPlanarSurface.IsPlanar()) Standard_Failure::Raise();
if(!isPlanarSurface.IsPlanar()) throw Standard_Failure();
gp_Pln aPlane = isPlanarSurface.Plan();
gp_Ax2 aMirrorAx2 = aPlane.Position().Ax2();
aTransformation.SetMirror(aMirrorAx2);