0026937: Eliminate NO_CXX_EXCEPTION macro support
[occt.git] / src / ChFi3d / ChFi3d_FilBuilder.cxx
index 6724171..b7b1d89 100644 (file)
@@ -620,8 +620,7 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                             Standard_Integer&                   intl)
 {
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
-  if(fsp.IsNull()) Standard_ConstructionError::Raise
-    ("SimulSurf : this is not the spine of the fillet");
+  if(fsp.IsNull()) throw Standard_ConstructionError("SimulSurf : this is not the spine of the fillet");
   Handle(BRepBlend_Line) lin;
 #ifdef OCCT_DEBUG
 //  TopAbs_Orientation Or = S1->ChangeSurface().Face().Orientation();
@@ -766,8 +765,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                                   const math_Vector&                  Soldep)
 {
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
-  if(fsp.IsNull()) Standard_ConstructionError::Raise
-    ("PerformSurf : this is not the spine of the fillet");
+  if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : this is not the spine of the fillet");
   Handle(BRepBlend_Line) lin;
   
   // Flexible parameters!
@@ -802,7 +800,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                     PFirst,MaxStep,locfleche,TolGuide,First,Last,
                     Soldep,4,Inside,Appro,Forward,RecP,RecS,RecRst);
     if(!done) {
-      Standard_Failure::Raise("SimulSurf : Failed process!");
+      throw Standard_Failure("SimulSurf : Failed process!");
     }
     Standard_Integer nbp = lin->NbPoints();
     sec = new ChFiDS_SecHArray1(1,nbp);
@@ -840,7 +838,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                     func,finv,finvp,finvc,
                     PFirst,MaxStep,locfleche,TolGuide,First,Last,
                     Soldep,4,Inside,Appro,Forward,RecP,RecS,RecRst);
-    if(!done) Standard_Failure::Raise("SimulSurf : Fail !");
+    if(!done) throw Standard_Failure("SimulSurf : Fail !");
     Standard_Integer nbp = lin->NbPoints();
     sec = new ChFiDS_SecHArray1(1,nbp);
     for(Standard_Integer i = 1; i <= nbp; i++){
@@ -901,8 +899,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                                   const math_Vector&                  Soldep)
 {
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
-  if(fsp.IsNull()) Standard_ConstructionError::Raise
-    ("PerformSurf : it is not the spine of a fillet");
+  if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : it is not the spine of a fillet");
   Handle(BRepBlend_Line) lin;
   
   // Flexible parameters!
@@ -936,7 +933,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                     func,finv,finvp,finvc,
                     PFirst,MaxStep,locfleche,TolGuide,First,Last,
                     Soldep,4,Inside,Appro,Forward,RecP,RecS,RecRst);
-    if(!done) Standard_Failure::Raise("SimulSurf : Failed Processing!");
+    if(!done) throw Standard_Failure("SimulSurf : Failed Processing!");
     Standard_Integer nbp = lin->NbPoints();
     sec = new ChFiDS_SecHArray1(1,nbp);
     for(Standard_Integer i = 1; i <= nbp; i++){
@@ -973,7 +970,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                     func,finv,finvp,finvc,
                     PFirst,MaxStep,locfleche,TolGuide,First,Last,
                     Soldep,4,Inside,Appro,Forward,RecP,RecS,RecRst);
-    if(!done) Standard_Failure::Raise("SimulSurf : Fail !");
+    if(!done) throw Standard_Failure("SimulSurf : Fail !");
     Standard_Integer nbp = lin->NbPoints();
     sec = new ChFiDS_SecHArray1(1,nbp);
     for(Standard_Integer i = 1; i <= nbp; i++){
@@ -1042,8 +1039,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                                   const math_Vector&                  Soldep)
 {
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
-  if(fsp.IsNull()) Standard_ConstructionError::Raise
-    ("PerformSurf : it is not the spine of a fillet");
+  if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : it is not the spine of a fillet");
   Handle(BRepBlend_Line) lin;
   
   // Flexible parameters!
@@ -1086,7 +1082,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                     func, finv1, finvp1, finv2, finvp2,
                     PFirst, MaxStep, locfleche, TolGuide, First, Last,
                     Soldep, 4, Inside, Appro, Forward, RecP1, RecRst1, RecP2, RecRst2);
-    if(!done) Standard_Failure::Raise("SimulSurf : Failed processing!");
+    if(!done) throw Standard_Failure("SimulSurf : Failed processing!");
     Standard_Integer nbp = lin->NbPoints();
     sec = new ChFiDS_SecHArray1(1,nbp);
     for(Standard_Integer i = 1; i <= nbp; i++){
@@ -1137,7 +1133,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                     PFirst, MaxStep, locfleche, TolGuide, First, Last,
                     Soldep, 4, Inside, Appro, Forward, RecP1, RecRst1, RecP2, RecRst2);
 
-    if(!done) Standard_Failure::Raise("SimulSurf : Fail !");
+    if(!done) throw Standard_Failure("SimulSurf : Fail !");
     Standard_Integer nbp = lin->NbPoints();
     sec = new ChFiDS_SecHArray1(1, nbp);
     for(Standard_Integer i = 1; i <= nbp; i++){
@@ -1193,8 +1189,7 @@ Standard_Boolean ChFi3d_FilBuilder::PerformFirstSection
  TopAbs_State&                       Pos2) const 
 {
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
-  if(fsp.IsNull()) Standard_ConstructionError::Raise
-    ("PerformSurf : this is not the spine of a fillet");
+  if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : this is not the spine of a fillet");
   Standard_Real TolGuide = HGuide->Resolution(tolesp);
   if(fsp->IsConstant()){
     BRepBlend_ConstRad Func(S1,S2,HGuide);
@@ -1247,8 +1242,7 @@ ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData,
 #endif
   Handle(ChFiDS_SurfData) Data = SeqData(1);
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
-  if(fsp.IsNull()) Standard_ConstructionError::Raise
-    ("PerformSurf : this is not the spine of a fillet");
+  if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : this is not the spine of a fillet");
   Standard_Boolean gd1,gd2,gf1,gf2, maybesingular;
   Handle(BRepBlend_Line) lin;
   TopAbs_Orientation Or = S1->ChangeSurface().Face().Orientation();
@@ -1287,7 +1281,7 @@ ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData,
          ChFi3d_ResultChron(ch , t_completedata);// result perf CompleteData
 #endif 
 
-    if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
+    if(!done) throw Standard_Failure("PerformSurf : Failed approximation!");
     maybesingular = (Func.GetMinimalDistance()<=100*tolapp3d);
   }
   else {
@@ -1321,7 +1315,7 @@ ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData,
          ChFi3d_ResultChron(ch , t_completedata);// result perf CompleteData
 #endif 
 
-    if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
+    if(!done) throw Standard_Failure("PerformSurf : Failed approximation!");
     maybesingular = (Func.GetMinimalDistance()<=100*tolapp3d); 
   }
   if (maybesingular) SplitSurf(SeqData, lin);
@@ -1361,8 +1355,7 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
 {
   Handle(ChFiDS_SurfData)  Data = SeqData(1);
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
-  if(fsp.IsNull()) Standard_ConstructionError::Raise
-    ("PerformSurf : this is not the spine of a fillet");
+  if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : this is not the spine of a fillet");
   Handle(BRepBlend_Line) lin;
   Standard_Real PFirst = First;
   Standard_Boolean maybesingular;
@@ -1393,11 +1386,11 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
                       Soldep,Inside,Appro,Forward,RecP,RecS,RecRst);
     if(!done) {
        Spine->SetErrorStatus(ChFiDS_WalkingFailure); 
-       Standard_Failure::Raise("PerformSurf : Failed processing!");
+       throw Standard_Failure("PerformSurf : Failed processing!");
     }
     TopAbs_Orientation Or = HS2->ChangeSurface().Face().Orientation();
     done = CompleteData(Data,func,lin,HS1,HS2,Or,1);
-    if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
+    if(!done) throw Standard_Failure("PerformSurf : Failed approximation!");
     maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); 
   }
   else {
@@ -1423,11 +1416,11 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
                       Soldep,Inside,Appro,Forward,RecP,RecS,RecRst);
     if(!done) {
       Spine->SetErrorStatus(ChFiDS_WalkingFailure);
-      Standard_Failure::Raise("PerformSurf : Failed processing!");
+      throw Standard_Failure("PerformSurf : Failed processing!");
     }
     TopAbs_Orientation Or = HS2->ChangeSurface().Face().Orientation();
     done = CompleteData(Data,func,lin,HS1,HS2,Or,1);
-    if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
+    if(!done) throw Standard_Failure("PerformSurf : Failed approximation!");
    maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); 
   }
   if (maybesingular) SplitSurf(SeqData, lin);
@@ -1466,8 +1459,7 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
 {
   Handle(ChFiDS_SurfData) Data = SeqData(1);;
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
-  if(fsp.IsNull()) Standard_ConstructionError::Raise
-    ("PerformSurf : this is not the spine of a fillet");
+  if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : this is not the spine of a fillet");
   Handle(BRepBlend_Line) lin;
   Standard_Real PFirst = First;
   Standard_Boolean maybesingular;
@@ -1498,11 +1490,11 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
                       Soldep,Inside,Appro,Forward,RecP,RecS,RecRst);
     if(!done) {
       Spine->SetErrorStatus(ChFiDS_WalkingFailure);
-      Standard_Failure::Raise("PerformSurf : Failed processing!");
+      throw Standard_Failure("PerformSurf : Failed processing!");
     }
     TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation();
     done = CompleteData(Data,func,lin,HS1,HS2,Or,0);
-    if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
+    if(!done) throw Standard_Failure("PerformSurf : Failed approximation!");
     maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); 
   }
   else {
@@ -1529,11 +1521,11 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
                       Soldep,Inside,Appro,Forward,RecP,RecS,RecRst);
     if(!done) {
       Spine->SetErrorStatus(ChFiDS_WalkingFailure);
-      Standard_Failure::Raise("PerformSurf : Failed processing!");
+      throw Standard_Failure("PerformSurf : Failed processing!");
     }
     TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation();
     done = CompleteData(Data,func,lin,HS1,HS2,Or,0);
-    if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
+    if(!done) throw Standard_Failure("PerformSurf : Failed approximation!");
     maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); 
   }
   if (maybesingular) SplitSurf(SeqData, lin); 
@@ -1583,8 +1575,7 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
 {
   Handle(ChFiDS_SurfData) Data = SeqData(1);;
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
-  if(fsp.IsNull()) Standard_ConstructionError::Raise
-    ("PerformSurf : this is not the spine of a fillet");
+  if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : this is not the spine of a fillet");
   Handle(BRepBlend_Line) lin;
   Standard_Real PFirst = First;
   Standard_Boolean maybesingular;
@@ -1622,11 +1613,11 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
                       Soldep, Inside, Appro, Forward, RecP1, RecRst1, RecP2, RecRst2);
     if(!done) {
        Spine->SetErrorStatus(ChFiDS_WalkingFailure);
-       Standard_Failure::Raise("PerformSurf : Failed processing!");
+       throw Standard_Failure("PerformSurf : Failed processing!");
     }
     TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation();
     done = CompleteData(Data, func, lin, HS1, HS2, Or);
-    if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
+    if(!done) throw Standard_Failure("PerformSurf : Failed approximation!");
     maybesingular = (func.GetMinimalDistance()<=100*tolapp3d); 
   }
   else {
@@ -1665,11 +1656,11 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
 
     if(!done) {
       Spine->SetErrorStatus(ChFiDS_WalkingFailure);
-      Standard_Failure::Raise("PerformSurf : Failed processing!");
+      throw Standard_Failure("PerformSurf : Failed processing!");
     }
     TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation();
     done = CompleteData(Data, func, lin, HS1, HS2, Or);
-    if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
+    if(!done) throw Standard_Failure("PerformSurf : Failed approximation!");
     maybesingular = (func.GetMinimalDistance()<=100*tolapp3d);