mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-18 14:27:39 +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:
@@ -312,7 +312,7 @@ void Approx_CurveOnSurface_Eval2d::Evaluate (Standard_Integer *Dimension,
|
||||
const Standard_Boolean only2d)
|
||||
{
|
||||
myIsDone = Standard_False;
|
||||
if(only3d && only2d) Standard_ConstructionError::Raise();
|
||||
if(only3d && only2d) throw Standard_ConstructionError();
|
||||
GeomAbs_Shape Order = S;
|
||||
|
||||
Handle( Adaptor2d_HCurve2d ) TrimmedC2D = C2D->Trim( First, Last, Precision::PConfusion() );
|
||||
|
@@ -74,7 +74,7 @@ static void findfourpoints(const Standard_Real ,
|
||||
{
|
||||
Standard_Integer i, j;
|
||||
Standard_Integer NbInt = Si->Length() - 1;
|
||||
if (NbInt < 3) Standard_ConstructionError::Raise("Approx_CurvlinFunc::GetUParameter");
|
||||
if (NbInt < 3) throw Standard_ConstructionError("Approx_CurvlinFunc::GetUParameter");
|
||||
|
||||
if(NInterval < 1) NInterval = 1;
|
||||
else if(NInterval > NbInt - 2) NInterval = NbInt - 2;
|
||||
@@ -325,7 +325,7 @@ void Approx_CurvlinFunc::Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape
|
||||
|
||||
void Approx_CurvlinFunc::Trim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol)
|
||||
{
|
||||
if (First < 0 || Last >1) Standard_OutOfRange::Raise("Approx_CurvlinFunc::Trim");
|
||||
if (First < 0 || Last >1) throw Standard_OutOfRange("Approx_CurvlinFunc::Trim");
|
||||
if ((Last - First) < Tol) return;
|
||||
|
||||
Standard_Real FirstU, LastU;
|
||||
@@ -461,7 +461,7 @@ Standard_Real Approx_CurvlinFunc::GetUParameter(Adaptor3d_Curve& C,
|
||||
#ifdef OCCT_DEBUG_CHRONO
|
||||
InitChron(chr_uparam);
|
||||
#endif
|
||||
if(S < 0 || S > 1) Standard_ConstructionError::Raise("Approx_CurvlinFunc::GetUParameter");
|
||||
if(S < 0 || S > 1) throw Standard_ConstructionError("Approx_CurvlinFunc::GetUParameter");
|
||||
|
||||
if(NumberOfCurve == 1) {
|
||||
InitUArray = myUi_1;
|
||||
@@ -527,7 +527,7 @@ Standard_Real Approx_CurvlinFunc::GetSParameter(Adaptor3d_Curve& C, const Standa
|
||||
|
||||
Standard_Boolean Approx_CurvlinFunc::EvalCase1(const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result) const
|
||||
{
|
||||
if(myCase != 1) Standard_ConstructionError::Raise("Approx_CurvlinFunc::EvalCase1");
|
||||
if(myCase != 1) throw Standard_ConstructionError("Approx_CurvlinFunc::EvalCase1");
|
||||
|
||||
gp_Pnt C;
|
||||
gp_Vec dC_dU, dC_dS, d2C_dU2, d2C_dS2;
|
||||
@@ -576,7 +576,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase1(const Standard_Real S, const Stan
|
||||
|
||||
Standard_Boolean Approx_CurvlinFunc::EvalCase2(const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result) const
|
||||
{
|
||||
if(myCase != 2) Standard_ConstructionError::Raise("Approx_CurvlinFunc::EvalCase2");
|
||||
if(myCase != 2) throw Standard_ConstructionError("Approx_CurvlinFunc::EvalCase2");
|
||||
|
||||
Standard_Boolean Done;
|
||||
|
||||
@@ -587,7 +587,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase2(const Standard_Real S, const Stan
|
||||
|
||||
Standard_Boolean Approx_CurvlinFunc::EvalCase3(const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result)
|
||||
{
|
||||
if(myCase != 3) Standard_ConstructionError::Raise("Approx_CurvlinFunc::EvalCase3");
|
||||
if(myCase != 3) throw Standard_ConstructionError("Approx_CurvlinFunc::EvalCase3");
|
||||
|
||||
TColStd_Array1OfReal tmpRes1(0, 4), tmpRes2(0, 4);
|
||||
Standard_Boolean Done;
|
||||
@@ -629,7 +629,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCurOnSur(const Standard_Real S, const S
|
||||
Length = myLength2;
|
||||
}
|
||||
else
|
||||
Standard_ConstructionError::Raise("Approx_CurvlinFunc::EvalCurOnSur");
|
||||
throw Standard_ConstructionError("Approx_CurvlinFunc::EvalCurOnSur");
|
||||
|
||||
Standard_Real Mag, dU_dS, d2U_dS2, dV_dU, dW_dU, dV_dS, dW_dS, d2V_dS2, d2W_dS2, d2V_dU2, d2W_dU2;
|
||||
gp_Pnt2d C2D;
|
||||
|
@@ -604,7 +604,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
|
||||
BSplCLib::Interpolate(3,FlatKnots,InterpolationParameters,ContactOrder,
|
||||
1,Poles(1),inversion_problem);
|
||||
if(inversion_problem) {
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
|
||||
// Test if par2d(par3d) is monotonous function or not ----- IFV, Jan 2000
|
||||
@@ -841,7 +841,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
|
||||
1,Poles(1),inversion_problem);
|
||||
if(inversion_problem)
|
||||
{
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
|
||||
Standard_Real besttol = sqrt(besttol2);
|
||||
|
@@ -610,7 +610,7 @@ SurfShape(Standard_Integer& UDegree,
|
||||
Standard_Integer& NbUKnots,
|
||||
Standard_Integer& NbVKnots) const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise("Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
UDegree = udeg;
|
||||
VDegree = vdeg;
|
||||
NbUPoles = tabPoles->ColLength();
|
||||
@@ -627,7 +627,7 @@ Surface(TColgp_Array2OfPnt& TPoles,
|
||||
TColStd_Array1OfInteger& TUMults,
|
||||
TColStd_Array1OfInteger& TVMults) const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise("Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
TPoles = tabPoles->Array2();
|
||||
TWeights = tabWeights->Array2();
|
||||
TUKnots = tabUKnots->Array1();
|
||||
@@ -640,7 +640,7 @@ Standard_Real Approx_SweepApproximation::MaxErrorOnSurf() const
|
||||
{
|
||||
Standard_Integer ii;
|
||||
Standard_Real MaxError = 0, err;
|
||||
if (!done) {StdFail_NotDone::Raise("Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
|
||||
if (myFunc->IsRational()) {
|
||||
TColStd_Array1OfReal Wmin(1, Num1DSS);
|
||||
@@ -664,7 +664,7 @@ Standard_Real Approx_SweepApproximation::MaxErrorOnSurf() const
|
||||
{
|
||||
Standard_Integer ii;
|
||||
Standard_Real MoyError = 0, err;
|
||||
if (!done) {StdFail_NotDone::Raise("Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
|
||||
if (myFunc->IsRational()) {
|
||||
TColStd_Array1OfReal Wmin(1, Num1DSS);
|
||||
@@ -689,8 +689,8 @@ void Approx_SweepApproximation::Curves2dShape(Standard_Integer& Degree,
|
||||
Standard_Integer& NbPoles,
|
||||
Standard_Integer& NbKnots) const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise("Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise("Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {throw Standard_DomainError("Approx_SweepApproximation");}
|
||||
Degree = deg2d;
|
||||
NbPoles = seqPoles2d(1)->Length();
|
||||
NbKnots = tab2dKnots->Length();
|
||||
@@ -701,8 +701,8 @@ void Approx_SweepApproximation::Curve2d(const Standard_Integer Index,
|
||||
TColStd_Array1OfReal& TKnots,
|
||||
TColStd_Array1OfInteger& TMults) const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise("Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise("Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {throw Standard_DomainError("Approx_SweepApproximation");}
|
||||
TPoles = seqPoles2d(Index)->Array1();
|
||||
TKnots = tab2dKnots->Array1();
|
||||
TMults = tab2dMults->Array1();
|
||||
@@ -710,19 +710,19 @@ void Approx_SweepApproximation::Curve2d(const Standard_Integer Index,
|
||||
|
||||
Standard_Real Approx_SweepApproximation::Max2dError(const Standard_Integer Index) const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise("Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
return tab2dError->Value(Index);
|
||||
}
|
||||
|
||||
Standard_Real Approx_SweepApproximation::Average2dError(const Standard_Integer Index) const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise("Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
return Ave2dError->Value(Index);
|
||||
}
|
||||
|
||||
Standard_Real Approx_SweepApproximation::TolCurveOnSurf(const Standard_Integer Index) const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise("Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
return COnSurfErr->Value(Index);
|
||||
}
|
||||
|
||||
|
@@ -29,95 +29,95 @@ inline Standard_Boolean Approx_SweepApproximation::IsDone() const
|
||||
|
||||
inline Standard_Integer Approx_SweepApproximation::UDegree() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
return udeg;
|
||||
}
|
||||
|
||||
|
||||
inline Standard_Integer Approx_SweepApproximation::VDegree() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
return vdeg;
|
||||
}
|
||||
|
||||
|
||||
inline const TColgp_Array2OfPnt& Approx_SweepApproximation::SurfPoles() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
return tabPoles->Array2();
|
||||
}
|
||||
|
||||
|
||||
inline const TColStd_Array2OfReal& Approx_SweepApproximation::SurfWeights() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
return tabWeights->Array2();
|
||||
}
|
||||
|
||||
|
||||
inline const TColStd_Array1OfReal& Approx_SweepApproximation::SurfUKnots() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
return tabUKnots->Array1();
|
||||
}
|
||||
|
||||
|
||||
inline const TColStd_Array1OfReal& Approx_SweepApproximation::SurfVKnots() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
return tabVKnots->Array1();
|
||||
}
|
||||
|
||||
|
||||
inline const TColStd_Array1OfInteger& Approx_SweepApproximation::SurfUMults() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
return tabUMults->Array1();
|
||||
}
|
||||
|
||||
|
||||
inline const TColStd_Array1OfInteger& Approx_SweepApproximation::SurfVMults() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
return tabVMults->Array1();
|
||||
}
|
||||
|
||||
|
||||
inline Standard_Integer Approx_SweepApproximation::NbCurves2d() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
return Num2DSS;
|
||||
}
|
||||
|
||||
|
||||
inline Standard_Integer Approx_SweepApproximation::Curves2dDegree() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
|
||||
return deg2d;
|
||||
}
|
||||
|
||||
|
||||
inline const TColgp_Array1OfPnt2d& Approx_SweepApproximation::Curve2dPoles(const Standard_Integer Index) const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
|
||||
return seqPoles2d(Index)->Array1();
|
||||
}
|
||||
|
||||
|
||||
inline const TColStd_Array1OfReal& Approx_SweepApproximation::Curves2dKnots() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
|
||||
return tab2dKnots->Array1();
|
||||
}
|
||||
|
||||
|
||||
inline const TColStd_Array1OfInteger& Approx_SweepApproximation::Curves2dMults() const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();}
|
||||
if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
|
||||
if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
|
||||
return tab2dMults->Array1();
|
||||
}
|
||||
|
||||
|
@@ -26,37 +26,33 @@ IMPLEMENT_STANDARD_RTTIEXT(Approx_SweepFunction,MMgt_TShared)
|
||||
// Standard_Boolean Approx_SweepFunction::D1(const Standard_Real Param,const Standard_Real First,const Standard_Real Last,TColgp_Array1OfPnt& Poles,TColgp_Array1OfVec& DPoles,TColgp_Array1OfPnt2d& Poles2d,TColgp_Array1OfVec2d& DPoles2d,TColStd_Array1OfReal& Weigths,TColStd_Array1OfReal& DWeigths)
|
||||
Standard_Boolean Approx_SweepFunction::D1(const Standard_Real ,const Standard_Real ,const Standard_Real ,TColgp_Array1OfPnt& ,TColgp_Array1OfVec& ,TColgp_Array1OfPnt2d& ,TColgp_Array1OfVec2d& ,TColStd_Array1OfReal& ,TColStd_Array1OfReal& )
|
||||
{
|
||||
Standard_NotImplemented::Raise("Approx_SweepFunction::D1");
|
||||
return Standard_False;
|
||||
throw Standard_NotImplemented("Approx_SweepFunction::D1");
|
||||
}
|
||||
|
||||
// Standard_Boolean Approx_SweepFunction::D2(const Standard_Real Param,const Standard_Real First,const Standard_Real Last,TColgp_Array1OfPnt& Poles,TColgp_Array1OfVec& DPoles,TColgp_Array1OfVec& D2Poles,TColgp_Array1OfPnt2d& Poles2d,TColgp_Array1OfVec2d& DPoles2d,TColgp_Array1OfVec2d& D2Poles2d,TColStd_Array1OfReal& Weigths,TColStd_Array1OfReal& DWeigths,TColStd_Array1OfReal& D2Weigths)
|
||||
Standard_Boolean Approx_SweepFunction::D2(const Standard_Real ,const Standard_Real ,const Standard_Real ,TColgp_Array1OfPnt& ,TColgp_Array1OfVec& ,TColgp_Array1OfVec& ,TColgp_Array1OfPnt2d& ,TColgp_Array1OfVec2d& ,TColgp_Array1OfVec2d& ,TColStd_Array1OfReal& ,TColStd_Array1OfReal& ,TColStd_Array1OfReal& )
|
||||
{
|
||||
Standard_NotImplemented::Raise("Approx_SweepFunction::D2");
|
||||
return Standard_False;
|
||||
throw Standard_NotImplemented("Approx_SweepFunction::D2");
|
||||
}
|
||||
|
||||
// void Approx_SweepFunction::Resolution(const Standard_Integer Index,const Standard_Real Tol,Standard_Real& TolU,Standard_Real& TolV) const
|
||||
void Approx_SweepFunction::Resolution(const Standard_Integer ,const Standard_Real ,Standard_Real& ,Standard_Real& ) const
|
||||
{
|
||||
Standard_NotImplemented::Raise("Approx_SweepFunction::Resolution");
|
||||
throw Standard_NotImplemented("Approx_SweepFunction::Resolution");
|
||||
}
|
||||
|
||||
gp_Pnt Approx_SweepFunction::BarycentreOfSurf() const
|
||||
{
|
||||
Standard_NotImplemented::Raise("Approx_SweepFunction::BarycentreOfSurf");
|
||||
return gp_Pnt(0.,0.,0.);
|
||||
throw Standard_NotImplemented("Approx_SweepFunction::BarycentreOfSurf");
|
||||
}
|
||||
|
||||
Standard_Real Approx_SweepFunction::MaximalSection() const
|
||||
{
|
||||
Standard_NotImplemented::Raise("Approx_SweepFunction::MaximalSection()");
|
||||
return 0;
|
||||
throw Standard_NotImplemented("Approx_SweepFunction::MaximalSection()");
|
||||
}
|
||||
|
||||
// void Approx_SweepFunction::GetMinimalWeight(TColStd_Array1OfReal& Weigths) const
|
||||
void Approx_SweepFunction::GetMinimalWeight(TColStd_Array1OfReal& ) const
|
||||
{
|
||||
Standard_NotImplemented::Raise("Approx_SweepFunction::GetMinimalWeight");
|
||||
throw Standard_NotImplemented("Approx_SweepFunction::GetMinimalWeight");
|
||||
}
|
||||
|
Reference in New Issue
Block a user