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

@@ -182,7 +182,7 @@ Standard_Integer SetSameDistribution(Handle(Geom_BSplineCurve)& C1,
}
}
else {
Standard_ConstructionError::Raise(" ");
throw Standard_ConstructionError(" ");
}
return C1->NbPoles();
@@ -286,7 +286,7 @@ void GeomFill_BSplineCurves::Init
if(Type == GeomFill_CoonsStyle) {
if(NbUPoles < 4 || NbVPoles < 4)
Standard_ConstructionError::Raise("GeomFill_BSplineCurves: invalid filling style");
throw Standard_ConstructionError("GeomFill_BSplineCurves: invalid filling style");
}
TColgp_Array1OfPnt P1(1,NbUPoles);
@@ -537,7 +537,7 @@ void GeomFill_BSplineCurves::Init
}
if(!IsOK)
Standard_OutOfRange::Raise("GeomFill_BSplineCurves: Courbes non jointives");
throw Standard_OutOfRange("GeomFill_BSplineCurves: Courbes non jointives");
Standard_Integer NbUPoles = CC1->NbPoles();
Standard_Integer NbVPoles = CC2->NbPoles();

View File

@@ -437,7 +437,7 @@ void GeomFill_BezierCurves::Init(const Handle(Geom_BezierCurve)& C1,
}
if(!IsOK)
Standard_OutOfRange::Raise("GeomFill_BezierCurves: Courbes non jointives");
throw Standard_OutOfRange("GeomFill_BezierCurves: Courbes non jointives");
CC1->Poles(P1);
CC2->Poles(P2);

View File

@@ -92,7 +92,7 @@ gp_Vec GeomFill_BoundWithSurf::Norm(const Standard_Real U) const
{
// voir s il ne faudrait pas utiliser LProp ou autre.
if (!HasNormals())
Standard_Failure::Raise("BoundWithSurf Norm : pas de contrainte");
throw Standard_Failure("BoundWithSurf Norm : pas de contrainte");
// Handle(Adaptor3d_HSurface)& S = myConS.GetSurface();
// Handle(Adaptor2d_HCurve2d)& C2d = myConS.GetCurve();
@@ -119,7 +119,7 @@ void GeomFill_BoundWithSurf::D1Norm(const Standard_Real U,
gp_Vec& DN) const
{
if (!HasNormals())
Standard_Failure::Raise("BoundWithSurf Norm : pas de contrainte");
throw Standard_Failure("BoundWithSurf Norm : pas de contrainte");
// Handle(Adaptor3d_HSurface)& S = myConS.GetSurface();
// Handle(Adaptor2d_HCurve2d)& C2d = myConS.GetCurve();
gp_Pnt2d P2d;

View File

@@ -51,8 +51,7 @@ Standard_Boolean GeomFill_Boundary::HasNormals() const
gp_Vec GeomFill_Boundary::Norm(const Standard_Real ) const
{
Standard_Failure::Raise("GeomFill_Boundary::Norm : Undefined normals");
return gp_Vec();
throw Standard_Failure("GeomFill_Boundary::Norm : Undefined normals");
}
@@ -63,7 +62,7 @@ gp_Vec GeomFill_Boundary::Norm(const Standard_Real ) const
void GeomFill_Boundary::D1Norm(const Standard_Real , gp_Vec& , gp_Vec& ) const
{
Standard_Failure::Raise("GeomFill_Boundary::Norm : Undefined normals");
throw Standard_Failure("GeomFill_Boundary::Norm : Undefined normals");
}

View File

@@ -514,8 +514,7 @@ void GeomFill_ConstrainedFilling::SetDomain
void GeomFill_ConstrainedFilling::ReBuild()
{
if(!appdone) Standard_Failure::Raise
("GeomFill_ConstrainedFilling::ReBuild Approx non faite");
if(!appdone) throw Standard_Failure("GeomFill_ConstrainedFilling::ReBuild Approx non faite");
MatchKnots();
PerformS0();
PerformS1();

View File

@@ -63,36 +63,6 @@ GeomFill_Curved::GeomFill_Curved(const TColgp_Array1OfPnt& P1,
Init(P1, P2, P3, P4, W1, W2, W3, W4);
}
//=======================================================================
//function : GeomFill_Curved
//purpose :
//=======================================================================
GeomFill_Curved::GeomFill_Curved(const TColgp_Array1OfPnt& P1,
const TColgp_Array1OfPnt& P2,
const TColgp_Array1OfPnt& P3)
{
Init(P1, P2, P3);
}
//=======================================================================
//function : GeomFill_Curved
//purpose :
//=======================================================================
GeomFill_Curved::GeomFill_Curved(const TColgp_Array1OfPnt& P1,
const TColgp_Array1OfPnt& P2,
const TColgp_Array1OfPnt& P3,
const TColStd_Array1OfReal& W1,
const TColStd_Array1OfReal& W2,
const TColStd_Array1OfReal& W3)
{
Init(P1, P2, P3, W1, W2, W3);
}
//=======================================================================
//function : GeomFill_Curved
//purpose :
@@ -235,35 +205,6 @@ void GeomFill_Curved::Init(const TColgp_Array1OfPnt& P1,
}
//=======================================================================
//function : Init
//purpose :
//=======================================================================
void GeomFill_Curved::Init(const TColgp_Array1OfPnt& , // P1,
const TColgp_Array1OfPnt& , // P2,
const TColgp_Array1OfPnt& )// P3)
{
Standard_NotImplemented::Raise(" ");
}
//=======================================================================
//function : Init
//purpose :
//=======================================================================
void GeomFill_Curved::Init(const TColgp_Array1OfPnt& , // P1,
const TColgp_Array1OfPnt& , // P2,
const TColgp_Array1OfPnt& , // P3,
const TColStd_Array1OfReal& , // W1,
const TColStd_Array1OfReal& , // W2,
const TColStd_Array1OfReal& ) // W3)
{
Standard_NotImplemented::Raise(" ");
}
//=======================================================================
//function : Init
//purpose :

View File

@@ -40,10 +40,6 @@ public:
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColgp_Array1OfPnt& P4, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2, const TColStd_Array1OfReal& W3, const TColStd_Array1OfReal& W4);
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3);
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2, const TColStd_Array1OfReal& W3);
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2);
Standard_EXPORT GeomFill_Curved(const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2);
@@ -52,10 +48,6 @@ public:
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColgp_Array1OfPnt& P4, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2, const TColStd_Array1OfReal& W3, const TColStd_Array1OfReal& W4);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColgp_Array1OfPnt& P3, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2, const TColStd_Array1OfReal& W3);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2);
Standard_EXPORT void Init (const TColgp_Array1OfPnt& P1, const TColgp_Array1OfPnt& P2, const TColStd_Array1OfReal& W1, const TColStd_Array1OfReal& W2);

View File

@@ -73,7 +73,7 @@ static void NormalD0(const Standard_Real U, const Standard_Real V, const Handle(
(Surf->Surface().UContinuity()) : (Surf->Surface().VContinuity());
OrderU = OrderV = 0;
#ifdef CHECK
if (Cont == GeomAbs_C0) Geom_UndefinedValue::Raise();
if (Cont == GeomAbs_C0) throw Geom_UndefinedValue();
#endif
gp_Pnt P;
Surf->D1(U, V, P, D1U, D1V);
@@ -84,7 +84,7 @@ static void NormalD0(const Standard_Real U, const Standard_Real V, const Handle(
if (NStatus != CSLib_Defined) {
if (Cont==GeomAbs_C0 ||
Cont==GeomAbs_C1) {
Geom_UndefinedValue::Raise();
throw Geom_UndefinedValue();
}
Standard_Integer MaxOrder=3;
TColgp_Array2OfVec DerNUV(0,MaxOrder,0,MaxOrder);
@@ -121,7 +121,7 @@ static void NormalD0(const Standard_Real U, const Standard_Real V, const Handle(
<< DerSurf(i,j).Y() <<"," << DerSurf(i,j).Z() << endl;
}
#endif
Geom_UndefinedValue::Raise();
throw Geom_UndefinedValue();
}
}
}
@@ -139,7 +139,7 @@ void NormalD1 (const Standard_Real U, const Standard_Real V,
(Surf->Surface().UContinuity()) : (Surf->Surface().VContinuity());
if (Cont==GeomAbs_C0 ||
Cont==GeomAbs_C1) {
Geom_UndefinedDerivative::Raise();
throw Geom_UndefinedDerivative();
}
#endif
gp_Vec d2u, d2v, d2uv;
@@ -182,7 +182,7 @@ void NormalD1 (const Standard_Real U, const Standard_Real V,
CSLib::Normal(MaxOrder,DerNUV,MagTol,U,V,Umin,Umax,Vmin,Vmax,
NStatus,Normal,OrderU,OrderV);
if (NStatus != CSLib_Defined) Geom_UndefinedValue::Raise();
if (NStatus != CSLib_Defined) throw Geom_UndefinedValue();
D1UNormal = CSLib::DNNormal(1,0,DerNUV,OrderU,OrderV);
D1VNormal = CSLib::DNNormal(0,1,DerNUV,OrderU,OrderV);
@@ -201,7 +201,7 @@ void NormalD2 (const Standard_Real U, const Standard_Real V,
GeomAbs_Shape Cont = (Surf->Surface().UContinuity() < Surf->Surface().VContinuity()) ?
(Surf->Surface().UContinuity()) : (Surf->Surface().VContinuity());
if (Cont == GeomAbs_C0 || Continuity == GeomAbs_C1 ||
Cont == GeomAbs_C2) { Geom_UndefinedDerivative::Raise(); }
Cont == GeomAbs_C2) { throw Geom_UndefinedDerivative(); }
#endif
gp_Vec d3u, d3uuv, d3uvv, d3v;
gp_Pnt P;
@@ -250,7 +250,7 @@ void NormalD2 (const Standard_Real U, const Standard_Real V,
CSLib::Normal(MaxOrder,DerNUV,MagTol,U,V,Umin,Umax,Vmin,Vmax,
NStatus,Normal,OrderU,OrderV);
if (NStatus != CSLib_Defined) Geom_UndefinedValue::Raise();
if (NStatus != CSLib_Defined) throw Geom_UndefinedValue();
D1UNormal = CSLib::DNNormal(1,0,DerNUV,OrderU,OrderV);
D1VNormal = CSLib::DNNormal(0,1,DerNUV,OrderU,OrderV);

View File

@@ -156,7 +156,7 @@ void GeomFill_DiscreteTrihedron::Init()
{
Standard_Real NewParam = (myKnots->Value(i-1) + myKnots->Value(i))/2.;
if (NewParam - myKnots->Value(i-1) < gp::Resolution())
Standard_ConstructionError::Raise("GeomFill_DiscreteTrihedron : impassable singularities on path curve");
throw Standard_ConstructionError("GeomFill_DiscreteTrihedron : impassable singularities on path curve");
myKnots->InsertBefore(i, NewParam);
i--;
}

View File

@@ -260,7 +260,7 @@ Standard_Boolean GeomFill_DraftTrihedron::D2(const Standard_Real Param,
case GeomAbs_C2:
case GeomAbs_C3:
case GeomAbs_CN: tmpS = GeomAbs_CN; break;
default: Standard_OutOfRange::Raise();
default: throw Standard_OutOfRange();
}
return myCurve->NbIntervals(tmpS);
@@ -280,7 +280,7 @@ Standard_Boolean GeomFill_DraftTrihedron::D2(const Standard_Real Param,
case GeomAbs_C2:
case GeomAbs_C3:
case GeomAbs_CN: tmpS = GeomAbs_CN; break;
default: Standard_OutOfRange::Raise();
default: throw Standard_OutOfRange();
}
myCurve->Intervals(TT, tmpS);

View File

@@ -352,7 +352,7 @@ void GeomFill_EvolvedSection::GetMinimalWeight(TColStd_Array1OfReal& Weights) co
Handle(Geom_Curve) GeomFill_EvolvedSection::ConstantSection() const
{
Standard_Real Err, scale;
if (!IsConstant(Err)) StdFail_NotDone::Raise("The Law is not Constant!");
if (!IsConstant(Err)) throw StdFail_NotDone("The Law is not Constant!");
gp_Trsf T;
gp_Pnt P(0, 0, 0);
scale = myLaw->Value(First) +

View File

@@ -29,7 +29,7 @@ GeomFill_Fixed::GeomFill_Fixed(const gp_Vec& Tangent,
const gp_Vec& Normal)
{
if (Tangent.IsParallel(Normal, 0.01) )
Standard_ConstructionError::Raise(
throw Standard_ConstructionError(
"GeomFill_Fixed : Two parallel vectors !");
T = Tangent;
T.Normalize();

View File

@@ -679,7 +679,7 @@ Standard_Boolean
case GeomAbs_C2:
case GeomAbs_C3:
case GeomAbs_CN: tmpS = GeomAbs_CN; break;
default: Standard_OutOfRange::Raise();
default: throw Standard_OutOfRange();
}
NbTrimmed = myCurve->NbIntervals(tmpS);
@@ -711,7 +711,7 @@ Standard_Boolean
case GeomAbs_C2:
case GeomAbs_C3:
case GeomAbs_CN: tmpS = GeomAbs_CN; break;
default: Standard_OutOfRange::Raise();
default: throw Standard_OutOfRange();
}
if (!isSngl) {

View File

@@ -218,7 +218,7 @@ static void InGoodPeriod(const Standard_Real Prec,
Standard_Real& LastAngle)
{
if (myCurve.IsNull())
Standard_ConstructionError::Raise(
throw Standard_ConstructionError(
"GeomFill_LocationGuide::The path is not setted !!");
//repere fixe
@@ -811,7 +811,7 @@ static void InGoodPeriod(const Standard_Real Prec,
cout << "DEDX = " << DEDX << endl;
cout << "DEDT = " << DEDT << endl;
#endif
Standard_ConstructionError::Raise(
throw Standard_ConstructionError(
"LocationGuide::D1 : No Result dans la derivee");
}
@@ -1364,7 +1364,7 @@ void GeomFill_LocationGuide::Resolution (const Standard_Integer ,
// void GeomFill_LocationGuide::Rotation(gp_Pnt& Centre) const
void GeomFill_LocationGuide::Rotation(gp_Pnt& ) const
{
Standard_NotImplemented::Raise("GeomFill_LocationGuide::Rotation");
throw Standard_NotImplemented("GeomFill_LocationGuide::Rotation");
}
//==================================================================

View File

@@ -28,8 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_LocationLaw,MMgt_TShared)
Standard_Boolean GeomFill_LocationLaw::D1(const Standard_Real, gp_Mat&, gp_Vec&,gp_Mat&, gp_Vec&,TColgp_Array1OfPnt2d&,TColgp_Array1OfVec2d&)
{
Standard_NotImplemented::Raise("GeomFill_LocationLaw::D1");
return 0;
throw Standard_NotImplemented("GeomFill_LocationLaw::D1");
}
Standard_Boolean GeomFill_LocationLaw::D2(const Standard_Real,
@@ -38,8 +37,7 @@ Standard_Boolean GeomFill_LocationLaw::D1(const Standard_Real, gp_Mat&, gp_Vec&,
gp_Mat&, gp_Vec&,
TColgp_Array1OfPnt2d&,TColgp_Array1OfVec2d&,TColgp_Array1OfVec2d&)
{
Standard_NotImplemented::Raise("GeomFill_LocationLaw::D2");
return 0;
throw Standard_NotImplemented("GeomFill_LocationLaw::D2");
}
Standard_Integer GeomFill_LocationLaw::Nb2dCurves() const
@@ -78,7 +76,7 @@ Standard_Boolean GeomFill_LocationLaw::D1(const Standard_Real, gp_Mat&, gp_Vec&,
// void GeomFill_LocationLaw::Resolution(const Standard_Integer Index,const Standard_Real Tol,Standard_Real& TolU,Standard_Real& TolV) const
void GeomFill_LocationLaw::Resolution(const Standard_Integer ,const Standard_Real ,Standard_Real& ,Standard_Real& ) const
{
Standard_NotImplemented::Raise("GeomFill_LocationLaw::Resolution");
throw Standard_NotImplemented("GeomFill_LocationLaw::Resolution");
}
void GeomFill_LocationLaw::SetTolerance(const Standard_Real,
@@ -97,5 +95,5 @@ Standard_Boolean GeomFill_LocationLaw::D1(const Standard_Real, gp_Mat&, gp_Vec&,
}
void GeomFill_LocationLaw::Rotation(gp_Pnt&) const
{
Standard_NotImplemented::Raise("GeomFill_SectionLaw::Rotation");
throw Standard_NotImplemented("GeomFill_SectionLaw::Rotation");
}

View File

@@ -920,7 +920,7 @@ void GeomFill_NSections::GetMinimalWeight(TColStd_Array1OfReal& Weights) const
Handle(Geom_Curve) GeomFill_NSections::ConstantSection() const
{
// Standard_Real Err;
// if (!IsConstant(Err)) StdFail_NotDone::Raise("The Law is not Constant!");
// if (!IsConstant(Err)) throw StdFail_NotDone("The Law is not Constant!");
Handle(Geom_Curve) C;
C = Handle(Geom_Curve)::DownCast( mySections(1)->Copy());
return C;
@@ -992,7 +992,7 @@ void GeomFill_NSections::GetMinimalWeight(TColStd_Array1OfReal& Weights) const
Handle(Geom_Curve) GeomFill_NSections::CirclSection(const Standard_Real V) const
{
Standard_Real Err;
if (!IsConicalLaw(Err)) StdFail_NotDone::Raise("The Law is not Conical!");
if (!IsConicalLaw(Err)) throw StdFail_NotDone("The Law is not Conical!");
GeomAdaptor_Curve AC1(mySections(1));
GeomAdaptor_Curve AC2(mySections(mySections.Length()));

View File

@@ -567,8 +567,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path,
default :
{
Standard_ConstructionError::Raise
("GeomFill::Init : Unknown Option");
throw Standard_ConstructionError("GeomFill::Init : Unknown Option");
}
}
@@ -717,8 +716,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path,
}
for ( i = 1; i<NSections.Length(); i++) {
if ( Abs(SeqP.Value(i+1)-SeqP.Value(i)) < Precision::PConfusion()) {
Standard_ConstructionError::Raise
("GeomFill_Pipe::Init with NSections : invalid parameters");
throw Standard_ConstructionError("GeomFill_Pipe::Init with NSections : invalid parameters");
}
}
@@ -890,7 +888,7 @@ void GeomFill_Pipe::Perform(const Standard_Real Tol,
myIsDone = Standard_True;
}
//else {
// Standard_ConstructionError::Raise ("GeomFill_Pipe::Perform : Cannot make a surface");
// throw Standard_ConstructionError("GeomFill_Pipe::Perform : Cannot make a surface");
//}
}
}
@@ -904,7 +902,7 @@ void GeomFill_Pipe::Perform(const Standard_Real Tol,
myIsDone = Standard_True;
}
//else {
// Standard_ConstructionError::Raise ("GeomFill_Pipe::Perform : Cannot make a surface");
// throw Standard_ConstructionError("GeomFill_Pipe::Perform : Cannot make a surface");
//}
}
else {
@@ -1057,7 +1055,7 @@ void GeomFill_Pipe::ApproxSurf(const Standard_Boolean WithParameters) {
// generate a sequence of the section by <SweepSectionGenerator>
// and approximate this sequence.
if (myType != 4) Standard_ConstructionError::Raise("GeomFill_Pipe");
if (myType != 4) throw Standard_ConstructionError("GeomFill_Pipe");
GeomFill_SweepSectionGenerator Section(myAdpPath, myAdpFirstSect,
myAdpLastSect,myRadius);
@@ -1123,7 +1121,7 @@ void GeomFill_Pipe::ApproxSurf(const Standard_Boolean WithParameters) {
#endif
}
#endif
//StdFail_NotDone::Raise("Pipe : App not done");
//throw StdFail_NotDone("Pipe : App not done");
}
else {
Standard_Integer UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots,

View File

@@ -256,7 +256,7 @@ void GeomFill_Profiler::Perform(const Standard_Real PTol)
Standard_Integer GeomFill_Profiler::Degree() const
{
if ( !myIsDone)
StdFail_NotDone::Raise("GeomFill_Profiler::Degree");
throw StdFail_NotDone("GeomFill_Profiler::Degree");
Handle(Geom_BSplineCurve) C =
Handle(Geom_BSplineCurve)::DownCast(mySequence(1));
@@ -272,7 +272,7 @@ Standard_Integer GeomFill_Profiler::Degree() const
Standard_Integer GeomFill_Profiler::NbPoles() const
{
if ( !myIsDone)
StdFail_NotDone::Raise("GeomFill_Profiler::Degree");
throw StdFail_NotDone("GeomFill_Profiler::Degree");
Handle(Geom_BSplineCurve) C =
Handle(Geom_BSplineCurve)::DownCast(mySequence(1));
@@ -289,7 +289,7 @@ void GeomFill_Profiler::Poles(const Standard_Integer Index,
TColgp_Array1OfPnt& Poles) const
{
if ( !myIsDone)
StdFail_NotDone::Raise("GeomFill_Profiler::Degree");
throw StdFail_NotDone("GeomFill_Profiler::Degree");
Standard_DomainError_Raise_if( Poles.Length() != NbPoles(),
"GeomFill_Profiler::Poles");
@@ -312,7 +312,7 @@ void GeomFill_Profiler::Weights(const Standard_Integer Index,
TColStd_Array1OfReal& Weights) const
{
if ( !myIsDone)
StdFail_NotDone::Raise("GeomFill_Profiler::Degree");
throw StdFail_NotDone("GeomFill_Profiler::Degree");
Standard_DomainError_Raise_if( Weights.Length() != NbPoles(),
"GeomFill_Profiler::Weights");
@@ -334,7 +334,7 @@ void GeomFill_Profiler::Weights(const Standard_Integer Index,
Standard_Integer GeomFill_Profiler::NbKnots() const
{
if ( !myIsDone)
StdFail_NotDone::Raise("GeomFill_Profiler::Degree");
throw StdFail_NotDone("GeomFill_Profiler::Degree");
Handle(Geom_BSplineCurve) C =
Handle(Geom_BSplineCurve)::DownCast(mySequence(1));
@@ -352,7 +352,7 @@ void GeomFill_Profiler::KnotsAndMults(TColStd_Array1OfReal& Knots,
TColStd_Array1OfInteger& Mults ) const
{
if ( !myIsDone)
StdFail_NotDone::Raise("GeomFill_Profiler::Degree");
throw StdFail_NotDone("GeomFill_Profiler::Degree");
#ifndef No_Exception
Standard_Integer n = NbKnots();

View File

@@ -28,14 +28,12 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_SectionLaw,MMgt_TShared)
Standard_Boolean GeomFill_SectionLaw::D1(const Standard_Real,TColgp_Array1OfPnt&,TColgp_Array1OfVec&,TColStd_Array1OfReal&,TColStd_Array1OfReal& )
{
Standard_NotImplemented::Raise("GeomFill_SectionLaw::D1");
return 0;
throw Standard_NotImplemented("GeomFill_SectionLaw::D1");
}
Standard_Boolean GeomFill_SectionLaw::D2(const Standard_Real,TColgp_Array1OfPnt& ,TColgp_Array1OfVec&,TColgp_Array1OfVec&,TColStd_Array1OfReal&,TColStd_Array1OfReal&,TColStd_Array1OfReal&)
{
Standard_NotImplemented::Raise("GeomFill_SectionLaw::D2");
return 0;
throw Standard_NotImplemented("GeomFill_SectionLaw::D2");
}
Handle(Geom_BSplineSurface) GeomFill_SectionLaw::BSplineSurface() const
@@ -53,13 +51,12 @@ Standard_Boolean GeomFill_SectionLaw::D1(const Standard_Real,TColgp_Array1OfPnt&
gp_Pnt GeomFill_SectionLaw::BarycentreOfSurf() const
{
Standard_NotImplemented::Raise("GeomFill_SectionLaw::BarycentreOfSurf");
return gp_Pnt(0.0, 0.0, 0.0);
throw Standard_NotImplemented("GeomFill_SectionLaw::BarycentreOfSurf");
}
void GeomFill_SectionLaw::GetMinimalWeight(TColStd_Array1OfReal&) const
{
Standard_NotImplemented::Raise("GeomFill_SectionLaw::GetMinimalWeight");
throw Standard_NotImplemented("GeomFill_SectionLaw::GetMinimalWeight");
}
Standard_Boolean GeomFill_SectionLaw::IsConstant(Standard_Real& Error) const
@@ -71,8 +68,7 @@ Standard_Boolean GeomFill_SectionLaw::D1(const Standard_Real,TColgp_Array1OfPnt&
Handle(Geom_Curve) GeomFill_SectionLaw::ConstantSection() const
{
Handle(Geom_Curve) C;
Standard_DomainError::Raise("GeomFill_SectionLaw::ConstantSection");
return C;
throw Standard_DomainError("GeomFill_SectionLaw::ConstantSection");
}
Standard_Boolean GeomFill_SectionLaw::IsConicalLaw(Standard_Real& Error) const
@@ -85,6 +81,5 @@ Standard_Boolean GeomFill_SectionLaw::D1(const Standard_Real,TColgp_Array1OfPnt&
CirclSection(const Standard_Real) const
{
Handle(Geom_Curve) C;
Standard_DomainError::Raise("GeomFill_SectionLaw::CirclSection");
return C;
throw Standard_DomainError("GeomFill_SectionLaw::CirclSection");
}

View File

@@ -804,7 +804,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Param,
Standard_Real angle;
if (!isplan)
Standard_Failure::Raise("Illegal usage: can't rotate non-planar profile");
throw Standard_Failure("Illegal usage: can't rotate non-planar profile");
gp_Dir ProfileNormal = TheAxe.Direction();
gp_Dir SpineStartDir = Paxe.Direction();
@@ -839,7 +839,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Param,
// gp_Trsf Rot;
// if (!isplan)
// Standard_Failure::Raise("Illegal usage: can't rotate non-planar profile");
// throw Standard_Failure("Illegal usage: can't rotate non-planar profile");
// gp_Dir ProfileNormal = TheAxe.Direction();
// gp_Dir SpineStartDir = Paxe.Direction();

View File

@@ -51,7 +51,7 @@ void GeomFill_SnglrFunc::SetRatio(const Standard_Real Ratio)
case GeomAbs_C0: HCS = GeomAbs_C2; break;
case GeomAbs_C1: HCS = GeomAbs_C3; break;
case GeomAbs_C2: HCS = GeomAbs_CN; break;
default: Standard_DomainError::Raise();
default: throw Standard_DomainError();
}
return myHCurve->NbIntervals(HCS);
}
@@ -63,7 +63,7 @@ void GeomFill_SnglrFunc::SetRatio(const Standard_Real Ratio)
case GeomAbs_C0: HCS = GeomAbs_C2; break;
case GeomAbs_C1: HCS = GeomAbs_C3; break;
case GeomAbs_C2: HCS = GeomAbs_CN; break;
default: Standard_DomainError::Raise();
default: throw Standard_DomainError();
}
myHCurve->Intervals(T, HCS);
}
@@ -153,12 +153,9 @@ gp_Vec GeomFill_SnglrFunc::DN(const Standard_Real U,const Standard_Integer N) co
D3(U,C,D1C,D2C,D3C);
return D3C;
default:
Standard_NotImplemented::Raise("Exception: Derivative order is greater than 3. "
throw Standard_NotImplemented("Exception: Derivative order is greater than 3. "
"Cannot compute of derivative.");
}
return gp_Vec();
}
Standard_Real GeomFill_SnglrFunc::Resolution(const Standard_Real R3D) const

View File

@@ -1101,7 +1101,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
{
Standard_Integer ind = IndexOfTrace+1;
if (IndexOfTrace > myLoc->TraceNumber())
Standard_OutOfRange::Raise(" GeomFill_Sweep::ErrorOnTrace");
throw Standard_OutOfRange(" GeomFill_Sweep::ErrorOnTrace");
UError = CError->Value(1, ind);
VError = CError->Value(2, ind);
@@ -1146,6 +1146,6 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
{
Standard_Integer ind = IndexOfTrace+1;
if (IndexOfTrace > myLoc->TraceNumber())
Standard_OutOfRange::Raise(" GeomFill_Sweep::Trace");
throw Standard_OutOfRange(" GeomFill_Sweep::Trace");
return myCurve2d->Value(ind);
}

View File

@@ -674,8 +674,7 @@ const gp_Trsf& GeomFill_SweepSectionGenerator::Transformation
(const Standard_Integer Index) const
{
if (Index > myTrsfs.Length())
Standard_RangeError::Raise
("GeomFill_SweepSectionGenerator::Transformation");
throw Standard_RangeError("GeomFill_SweepSectionGenerator::Transformation");
return myTrsfs(Index);
}

View File

@@ -43,8 +43,7 @@ void GeomFill_TrihedronLaw::SetCurve(const Handle(Adaptor3d_HCurve)& C)
gp_Vec& ,gp_Vec&,gp_Vec&,
gp_Vec&,gp_Vec&,gp_Vec& )
{
Standard_NotImplemented::Raise(" GeomFill_TrihedronLaw::D2");
return Standard_False;
throw Standard_NotImplemented(" GeomFill_TrihedronLaw::D2");
}
Standard_Boolean GeomFill_TrihedronLaw::D2(const Standard_Real,
@@ -52,8 +51,7 @@ void GeomFill_TrihedronLaw::SetCurve(const Handle(Adaptor3d_HCurve)& C)
gp_Vec& ,gp_Vec&,gp_Vec&,
gp_Vec&,gp_Vec& ,gp_Vec&)
{
Standard_NotImplemented::Raise(" GeomFill_TrihedronLaw::D2");
return Standard_False;
throw Standard_NotImplemented(" GeomFill_TrihedronLaw::D2");
}
void GeomFill_TrihedronLaw::SetInterval(const Standard_Real First,