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:
@@ -205,7 +205,7 @@
|
||||
}
|
||||
}
|
||||
else {
|
||||
Standard_DomainError::Raise("IntAna_Curve::Domain");
|
||||
throw Standard_DomainError("IntAna_Curve::Domain");
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
@@ -275,7 +275,7 @@
|
||||
((Theta>DomainSup*aRelTolp) && (!TwoCurves)) ||
|
||||
(Theta>(DomainSup+DomainSup-DomainInf)*aRelTolp)) {
|
||||
SigneSqrtDis = 0.;
|
||||
Standard_DomainError::Raise("IntAna_Curve::Domain");
|
||||
throw Standard_DomainError("IntAna_Curve::Domain");
|
||||
}
|
||||
|
||||
if(Theta>DomainSup) {
|
||||
@@ -573,7 +573,7 @@
|
||||
const Standard_Real DSup)
|
||||
{
|
||||
if(DInf>=DSup) {
|
||||
Standard_DomainError::Raise("IntAna_Curve::Domain");
|
||||
throw Standard_DomainError("IntAna_Curve::Domain");
|
||||
}
|
||||
//
|
||||
DomainInf=DInf;
|
||||
|
@@ -23,14 +23,14 @@ inline Standard_Boolean IntAna_Int3Pln::IsDone () const {
|
||||
|
||||
inline Standard_Boolean IntAna_Int3Pln::IsEmpty () const {
|
||||
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return empt;
|
||||
}
|
||||
|
||||
inline const gp_Pnt& IntAna_Int3Pln::Value () const {
|
||||
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (empt) {Standard_DomainError::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
if (empt) {throw Standard_DomainError();}
|
||||
return pnt;
|
||||
}
|
||||
|
||||
|
@@ -22,20 +22,20 @@ inline Standard_Boolean IntAna_IntConicQuad::IsDone() const {
|
||||
|
||||
|
||||
inline Standard_Boolean IntAna_IntConicQuad::IsInQuadric() const {
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return(inquadric);
|
||||
}
|
||||
|
||||
|
||||
inline Standard_Boolean IntAna_IntConicQuad::IsParallel() const {
|
||||
if(!done) {StdFail_NotDone::Raise();}
|
||||
if(!done) {throw StdFail_NotDone();}
|
||||
return(parallel);
|
||||
}
|
||||
|
||||
|
||||
inline Standard_Integer IntAna_IntConicQuad::NbPoints() const {
|
||||
if(!done) {StdFail_NotDone::Raise();}
|
||||
if (parallel || inquadric) {Standard_DomainError::Raise();}
|
||||
if(!done) {throw StdFail_NotDone();}
|
||||
if (parallel || inquadric) {throw Standard_DomainError();}
|
||||
return(nbpts);
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ inline Standard_Integer IntAna_IntConicQuad::NbPoints() const {
|
||||
inline const gp_Pnt& IntAna_IntConicQuad::Point
|
||||
(const Standard_Integer i) const {
|
||||
|
||||
if(!done) {StdFail_NotDone::Raise();}
|
||||
if (parallel || inquadric) {Standard_DomainError::Raise();}
|
||||
if((i>nbpts)||(i<=0)) {Standard_OutOfRange::Raise();}
|
||||
if(!done) {throw StdFail_NotDone();}
|
||||
if (parallel || inquadric) {throw Standard_DomainError();}
|
||||
if((i>nbpts)||(i<=0)) {throw Standard_OutOfRange();}
|
||||
return(pnts[i-1]);
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@ inline const gp_Pnt& IntAna_IntConicQuad::Point
|
||||
inline Standard_Real IntAna_IntConicQuad::ParamOnConic
|
||||
(const Standard_Integer i) const {
|
||||
|
||||
if(!done) {StdFail_NotDone::Raise();}
|
||||
if (parallel || inquadric) {Standard_DomainError::Raise();}
|
||||
if((i>nbpts)||(i<=0)) {Standard_OutOfRange::Raise();}
|
||||
if(!done) {throw StdFail_NotDone();}
|
||||
if (parallel || inquadric) {throw Standard_DomainError();}
|
||||
if((i>nbpts)||(i<=0)) {throw Standard_OutOfRange();}
|
||||
return(paramonc[i-1]);
|
||||
}
|
||||
|
@@ -20,23 +20,23 @@ inline Standard_Boolean IntAna_IntLinTorus::IsDone () const {
|
||||
}
|
||||
|
||||
inline Standard_Integer IntAna_IntLinTorus::NbPoints () const {
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return nbpt;
|
||||
}
|
||||
|
||||
inline const gp_Pnt& IntAna_IntLinTorus::Value
|
||||
(const Standard_Integer Index) const {
|
||||
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if(Index<=0 || Index>nbpt) { Standard_OutOfRange::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
if(Index<=0 || Index>nbpt) { throw Standard_OutOfRange();}
|
||||
return thePoint[Index-1];
|
||||
}
|
||||
|
||||
inline Standard_Real IntAna_IntLinTorus::ParamOnLine
|
||||
(const Standard_Integer Index) const {
|
||||
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if(Index<=0 || Index>nbpt) { Standard_OutOfRange::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
if(Index<=0 || Index>nbpt) { throw Standard_OutOfRange();}
|
||||
return theParam[Index-1];
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ inline void IntAna_IntLinTorus::ParamOnTorus
|
||||
(const Standard_Integer Index,
|
||||
Standard_Real& FI, Standard_Real& THETA) const {
|
||||
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if(Index<=0 || Index>nbpt) { Standard_OutOfRange::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
if(Index<=0 || Index>nbpt) { throw Standard_OutOfRange();}
|
||||
FI=theFi[Index-1];
|
||||
THETA=theTheta[Index-1];
|
||||
}
|
||||
|
@@ -84,21 +84,21 @@ class TrigonometricRoots {
|
||||
//NbSolutions
|
||||
Standard_Integer NbSolutions() {
|
||||
if(!done) {
|
||||
StdFail_NotDone::Raise();
|
||||
throw StdFail_NotDone();
|
||||
}
|
||||
return NbRoots;
|
||||
}
|
||||
//InfiniteRoots
|
||||
Standard_Boolean InfiniteRoots() {
|
||||
if(!done) {
|
||||
StdFail_NotDone::Raise();
|
||||
throw StdFail_NotDone();
|
||||
}
|
||||
return infinite_roots;
|
||||
}
|
||||
//Value
|
||||
Standard_Real Value(const Standard_Integer n) {
|
||||
if((!done)||(n>NbRoots)) {
|
||||
StdFail_NotDone::Raise();
|
||||
throw StdFail_NotDone();
|
||||
}
|
||||
return Roots[n-1];
|
||||
}
|
||||
@@ -1051,13 +1051,13 @@ void IntAna_IntQuadQuad::InternalSetNextAndPrevious()
|
||||
Standard_Boolean IntAna_IntQuadQuad::HasPreviousCurve(const Standard_Integer I) const
|
||||
{
|
||||
if(!done) {
|
||||
StdFail_NotDone::Raise("IntQuadQuad Not done");
|
||||
throw StdFail_NotDone("IntQuadQuad Not done");
|
||||
}
|
||||
if (identical) {
|
||||
Standard_DomainError::Raise("IntQuadQuad identical");
|
||||
throw Standard_DomainError("IntQuadQuad identical");
|
||||
}
|
||||
if((I>NbCurves)||(I<=0)) {
|
||||
Standard_OutOfRange::Raise("Incorrect Curve Number 'HasPrevious Curve'");
|
||||
throw Standard_OutOfRange("Incorrect Curve Number 'HasPrevious Curve'");
|
||||
}
|
||||
if(previouscurve[I-1]) {
|
||||
return Standard_True;
|
||||
@@ -1071,13 +1071,13 @@ Standard_Boolean IntAna_IntQuadQuad::HasPreviousCurve(const Standard_Integer I)
|
||||
Standard_Boolean IntAna_IntQuadQuad::HasNextCurve(const Standard_Integer I) const
|
||||
{
|
||||
if(!done) {
|
||||
StdFail_NotDone::Raise("IntQuadQuad Not done");
|
||||
throw StdFail_NotDone("IntQuadQuad Not done");
|
||||
}
|
||||
if (identical) {
|
||||
Standard_DomainError::Raise("IntQuadQuad identical");
|
||||
throw Standard_DomainError("IntQuadQuad identical");
|
||||
}
|
||||
if((I>NbCurves)||(I<=0)) {
|
||||
Standard_OutOfRange::Raise("Incorrect Curve Number 'HasNextCurve'");
|
||||
throw Standard_OutOfRange("Incorrect Curve Number 'HasNextCurve'");
|
||||
}
|
||||
if(nextcurve[I-1]) {
|
||||
return Standard_True;
|
||||
@@ -1102,7 +1102,7 @@ Standard_Integer IntAna_IntQuadQuad::PreviousCurve (const Standard_Integer I,
|
||||
}
|
||||
}
|
||||
else {
|
||||
Standard_DomainError::Raise("Incorrect Curve Number 'PreviousCurve'"); return(0);
|
||||
throw Standard_DomainError("Incorrect Curve Number 'PreviousCurve'");
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
@@ -1123,8 +1123,7 @@ Standard_Integer IntAna_IntQuadQuad::NextCurve (const Standard_Integer I,
|
||||
}
|
||||
}
|
||||
else {
|
||||
Standard_DomainError::Raise("Incorrect Curve Number 'NextCurve'");
|
||||
return(0);
|
||||
throw Standard_DomainError("Incorrect Curve Number 'NextCurve'");
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
@@ -1134,13 +1133,13 @@ Standard_Integer IntAna_IntQuadQuad::NextCurve (const Standard_Integer I,
|
||||
const IntAna_Curve& IntAna_IntQuadQuad::Curve(const Standard_Integer i) const
|
||||
{
|
||||
if(!done) {
|
||||
StdFail_NotDone::Raise("IntQuadQuad Not done");
|
||||
throw StdFail_NotDone("IntQuadQuad Not done");
|
||||
}
|
||||
if (identical) {
|
||||
Standard_DomainError::Raise("IntQuadQuad identical");
|
||||
throw Standard_DomainError("IntQuadQuad identical");
|
||||
}
|
||||
if((i <= 0) || (i>NbCurves)) {
|
||||
Standard_OutOfRange::Raise("Incorrect Curve Number");
|
||||
throw Standard_OutOfRange("Incorrect Curve Number");
|
||||
}
|
||||
return TheCurve[i-1];
|
||||
}
|
||||
@@ -1151,13 +1150,13 @@ const IntAna_Curve& IntAna_IntQuadQuad::Curve(const Standard_Integer i) const
|
||||
const gp_Pnt& IntAna_IntQuadQuad::Point (const Standard_Integer i) const
|
||||
{
|
||||
if(!done) {
|
||||
StdFail_NotDone::Raise("IntQuadQuad Not done");
|
||||
throw StdFail_NotDone("IntQuadQuad Not done");
|
||||
}
|
||||
if (identical) {
|
||||
Standard_DomainError::Raise("IntQuadQuad identical");
|
||||
throw Standard_DomainError("IntQuadQuad identical");
|
||||
}
|
||||
if((i <= 0) || (i>Nbpoints)) {
|
||||
Standard_OutOfRange::Raise("Incorrect Point Number");
|
||||
throw Standard_OutOfRange("Incorrect Point Number");
|
||||
}
|
||||
return Thepoints[i-1];
|
||||
}
|
||||
|
@@ -21,20 +21,20 @@ inline Standard_Boolean IntAna_IntQuadQuad::IsDone () const
|
||||
}
|
||||
|
||||
inline Standard_Boolean IntAna_IntQuadQuad::IdenticalElements () const {
|
||||
if(!done) {StdFail_NotDone::Raise("IntQuadQuad Not done");}
|
||||
if(!done) {throw StdFail_NotDone("IntQuadQuad Not done");}
|
||||
return(identical);
|
||||
}
|
||||
|
||||
inline Standard_Integer IntAna_IntQuadQuad::NbCurve () const {
|
||||
if(!done) {StdFail_NotDone::Raise("IntQuadQuad Not done");}
|
||||
if (identical) {Standard_DomainError::Raise();}
|
||||
if(!done) {throw StdFail_NotDone("IntQuadQuad Not done");}
|
||||
if (identical) {throw Standard_DomainError();}
|
||||
return(NbCurves);
|
||||
}
|
||||
|
||||
inline Standard_Integer IntAna_IntQuadQuad::NbPnt () const
|
||||
{
|
||||
if(!done) {StdFail_NotDone::Raise("IntQuadQuad Not done");}
|
||||
if (identical) {Standard_DomainError::Raise();}
|
||||
if(!done) {throw StdFail_NotDone("IntQuadQuad Not done");}
|
||||
if (identical) {throw Standard_DomainError();}
|
||||
return(Nbpoints);
|
||||
}
|
||||
|
||||
|
@@ -2549,10 +2549,10 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
|
||||
//=======================================================================
|
||||
gp_Pnt IntAna_QuadQuadGeo::Point(const Standard_Integer n) const
|
||||
{
|
||||
if(!done) { StdFail_NotDone::Raise(); }
|
||||
if(n>nbint || n<1) { Standard_DomainError::Raise(); }
|
||||
if(!done) { throw StdFail_NotDone(); }
|
||||
if(n>nbint || n<1) { throw Standard_DomainError(); }
|
||||
if(typeres==IntAna_PointAndCircle) {
|
||||
if(n!=1) { Standard_DomainError::Raise(); }
|
||||
if(n!=1) { throw Standard_DomainError(); }
|
||||
if(param1==0.0) return(pt1);
|
||||
return(pt2);
|
||||
}
|
||||
@@ -2570,9 +2570,9 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
|
||||
//=======================================================================
|
||||
gp_Lin IntAna_QuadQuadGeo::Line(const Standard_Integer n) const
|
||||
{
|
||||
if(!done) { StdFail_NotDone::Raise(); }
|
||||
if(!done) { throw StdFail_NotDone(); }
|
||||
if((n>nbint) || (n<1) || (typeres!=IntAna_Line)) {
|
||||
Standard_DomainError::Raise();
|
||||
throw Standard_DomainError();
|
||||
}
|
||||
if(n==1) { return(gp_Lin(pt1,dir1)); }
|
||||
else { return(gp_Lin(pt2,dir2)); }
|
||||
@@ -2583,14 +2583,14 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
|
||||
//=======================================================================
|
||||
gp_Circ IntAna_QuadQuadGeo::Circle(const Standard_Integer n) const
|
||||
{
|
||||
if(!done) { StdFail_NotDone::Raise(); }
|
||||
if(!done) { throw StdFail_NotDone(); }
|
||||
if(typeres==IntAna_PointAndCircle) {
|
||||
if(n!=1) { Standard_DomainError::Raise(); }
|
||||
if(n!=1) { throw Standard_DomainError(); }
|
||||
if(param2==0.0) return(gp_Circ(DirToAx2(pt1,dir1),param1));
|
||||
return(gp_Circ(DirToAx2(pt2,dir2),param2));
|
||||
}
|
||||
else if((n>nbint) || (n<1) || (typeres!=IntAna_Circle)) {
|
||||
Standard_DomainError::Raise();
|
||||
throw Standard_DomainError();
|
||||
}
|
||||
if (n==1) { return(gp_Circ(DirToAx2(pt1,dir1),param1));}
|
||||
else if (n==2) { return(gp_Circ(DirToAx2(pt2,dir2),param2));}
|
||||
@@ -2604,9 +2604,9 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
|
||||
//=======================================================================
|
||||
gp_Elips IntAna_QuadQuadGeo::Ellipse(const Standard_Integer n) const
|
||||
{
|
||||
if(!done) { StdFail_NotDone::Raise(); }
|
||||
if(!done) { throw StdFail_NotDone(); }
|
||||
if((n>nbint) || (n<1) || (typeres!=IntAna_Ellipse)) {
|
||||
Standard_DomainError::Raise();
|
||||
throw Standard_DomainError();
|
||||
}
|
||||
|
||||
if(n==1) {
|
||||
@@ -2635,13 +2635,13 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
|
||||
gp_Parab IntAna_QuadQuadGeo::Parabola(const Standard_Integer n) const
|
||||
{
|
||||
if(!done) {
|
||||
StdFail_NotDone::Raise();
|
||||
throw StdFail_NotDone();
|
||||
}
|
||||
if (typeres!=IntAna_Parabola) {
|
||||
Standard_DomainError::Raise();
|
||||
throw Standard_DomainError();
|
||||
}
|
||||
if((n>nbint) || (n!=1)) {
|
||||
Standard_OutOfRange::Raise();
|
||||
throw Standard_OutOfRange();
|
||||
}
|
||||
return(gp_Parab(gp_Ax2( pt1
|
||||
,dir1
|
||||
@@ -2655,10 +2655,10 @@ void IntAna_QuadQuadGeo::Perform(const gp_Torus& Tor1,
|
||||
gp_Hypr IntAna_QuadQuadGeo::Hyperbola(const Standard_Integer n) const
|
||||
{
|
||||
if(!done) {
|
||||
StdFail_NotDone::Raise();
|
||||
throw StdFail_NotDone();
|
||||
}
|
||||
if((n>nbint) || (n<1) || (typeres!=IntAna_Hyperbola)) {
|
||||
Standard_DomainError::Raise();
|
||||
throw Standard_DomainError();
|
||||
}
|
||||
if(n==1) {
|
||||
return(gp_Hypr(gp_Ax2( pt1
|
||||
|
@@ -20,12 +20,12 @@ inline Standard_Boolean IntAna_QuadQuadGeo::IsDone() const {
|
||||
|
||||
|
||||
inline IntAna_ResultType IntAna_QuadQuadGeo::TypeInter() const {
|
||||
if(!done) {StdFail_NotDone::Raise();}
|
||||
if(!done) {throw StdFail_NotDone();}
|
||||
return(typeres);
|
||||
}
|
||||
|
||||
inline Standard_Integer IntAna_QuadQuadGeo::NbSolutions() const {
|
||||
if(!done) {StdFail_NotDone::Raise();}
|
||||
if(!done) {throw StdFail_NotDone();}
|
||||
return(nbint);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user