mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -438,9 +438,9 @@ void Contap_ContAna::Perform (const gp_Cone& C,
|
||||
|
||||
gp_Lin Contap_ContAna::Line (const Standard_Integer Index) const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (typL != GeomAbs_Line || nbSol == 0) {Standard_DomainError::Raise();}
|
||||
if (Index <=0 || Index > nbSol) {Standard_OutOfRange::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
if (typL != GeomAbs_Line || nbSol == 0) {throw Standard_DomainError();}
|
||||
if (Index <=0 || Index > nbSol) {throw Standard_OutOfRange();}
|
||||
switch (Index) {
|
||||
case 1:
|
||||
return gp_Lin(pt1,dir1);
|
||||
@@ -451,6 +451,5 @@ gp_Lin Contap_ContAna::Line (const Standard_Integer Index) const
|
||||
case 4:
|
||||
return gp_Lin(pt4,dir4);
|
||||
}
|
||||
Standard_OutOfRange::Raise("Program error in Contap_ContAna");
|
||||
return gp_Lin();
|
||||
throw Standard_OutOfRange("Program error in Contap_ContAna");
|
||||
}
|
||||
|
@@ -28,20 +28,20 @@ inline Standard_Boolean Contap_ContAna::IsDone () const
|
||||
|
||||
inline Standard_Integer Contap_ContAna::NbContours () const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return nbSol;
|
||||
}
|
||||
|
||||
inline GeomAbs_CurveType Contap_ContAna::TypeContour () const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (nbSol == 0) {Standard_DomainError::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
if (nbSol == 0) {throw Standard_DomainError();}
|
||||
return typL;
|
||||
}
|
||||
|
||||
inline gp_Circ Contap_ContAna::Circle () const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (typL != GeomAbs_Circle || nbSol == 0) {Standard_DomainError::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
if (typL != GeomAbs_Circle || nbSol == 0) {throw Standard_DomainError();}
|
||||
return gp_Circ(gp_Ax2(pt1,dir1,dir2),prm);
|
||||
}
|
||||
|
@@ -141,7 +141,7 @@ void Contap_Contour::Init (const gp_Pnt& Eye)
|
||||
void Contap_Contour::Perform (const Handle(Adaptor3d_HSurface)& Surf,
|
||||
const Handle(Adaptor3d_TopolTool)& Domain)
|
||||
{
|
||||
if (!modeset) {Standard_ConstructionError::Raise();}
|
||||
if (!modeset) {throw Standard_ConstructionError();}
|
||||
mySFunc.Set(Surf);
|
||||
myAFunc.Set(Surf);
|
||||
|
||||
|
@@ -28,21 +28,21 @@ inline Standard_Boolean Contap_Contour::IsEmpty () const
|
||||
|
||||
inline Standard_Integer Contap_Contour::NbLines () const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return slin.Length();
|
||||
}
|
||||
|
||||
inline const Contap_Line &
|
||||
Contap_Contour::Line (const Standard_Integer Index) const
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return slin(Index);
|
||||
}
|
||||
|
||||
inline Contap_SurfFunction &
|
||||
Contap_Contour::SurfaceFunction ()
|
||||
{
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return mySFunc;
|
||||
}
|
||||
|
||||
|
@@ -325,7 +325,7 @@ void Contap_HContTool::Value(const Handle(Adaptor2d_HCurve2d)&,
|
||||
Standard_Real&,
|
||||
Standard_Real&)
|
||||
{
|
||||
Standard_OutOfRange::Raise();
|
||||
throw Standard_OutOfRange();
|
||||
}
|
||||
|
||||
Standard_Boolean Contap_HContTool::IsVertex(const Handle(Adaptor2d_HCurve2d)&,
|
||||
@@ -338,7 +338,7 @@ void Contap_HContTool::Vertex(const Handle(Adaptor2d_HCurve2d)&,
|
||||
const Standard_Integer,
|
||||
Handle(Adaptor3d_HVertex)&)
|
||||
{
|
||||
Standard_OutOfRange::Raise();
|
||||
throw Standard_OutOfRange();
|
||||
}
|
||||
|
||||
Standard_Integer Contap_HContTool::NbSegments(const Handle(Adaptor2d_HCurve2d)&)
|
||||
@@ -351,8 +351,7 @@ Standard_Boolean Contap_HContTool::HasFirstPoint
|
||||
const Standard_Integer,
|
||||
Standard_Integer&)
|
||||
{
|
||||
Standard_OutOfRange::Raise();
|
||||
return Standard_False;
|
||||
throw Standard_OutOfRange();
|
||||
}
|
||||
|
||||
Standard_Boolean Contap_HContTool::HasLastPoint
|
||||
@@ -360,8 +359,7 @@ Standard_Boolean Contap_HContTool::HasLastPoint
|
||||
const Standard_Integer,
|
||||
Standard_Integer&)
|
||||
{
|
||||
Standard_OutOfRange::Raise();
|
||||
return Standard_False;
|
||||
throw Standard_OutOfRange();
|
||||
}
|
||||
|
||||
Standard_Boolean Contap_HContTool::IsAllSolution
|
||||
|
@@ -100,6 +100,6 @@ IntSurf_TypeTrans Contap_Line::TransitionOnS() const {
|
||||
|
||||
const Handle(Adaptor2d_HCurve2d)& Contap_Line::Arc () const
|
||||
{
|
||||
if (typL != Contap_Restriction) {Standard_DomainError::Raise();}
|
||||
if (typL != Contap_Restriction) {throw Standard_DomainError();}
|
||||
return thearc;
|
||||
}
|
||||
|
@@ -50,23 +50,23 @@ inline Contap_IType Contap_Line::TypeContour () const
|
||||
}
|
||||
|
||||
inline Standard_Integer Contap_Line::NbPnts () const {
|
||||
if (typL != Contap_Walking) {Standard_DomainError::Raise();}
|
||||
if (typL != Contap_Walking) {throw Standard_DomainError();}
|
||||
return(curv->NbPoints());
|
||||
}
|
||||
|
||||
inline const IntSurf_PntOn2S& Contap_Line::Point (const Standard_Integer Index) const {
|
||||
if (typL != Contap_Walking) {Standard_DomainError::Raise();}
|
||||
if (typL != Contap_Walking) {throw Standard_DomainError();}
|
||||
return(curv->Value(Index));
|
||||
}
|
||||
|
||||
inline gp_Lin Contap_Line::Line () const
|
||||
{
|
||||
if (typL != Contap_Lin) {Standard_DomainError::Raise();}
|
||||
if (typL != Contap_Lin) {throw Standard_DomainError();}
|
||||
return gp_Lin(pt,dir1);
|
||||
}
|
||||
|
||||
inline gp_Circ Contap_Line::Circle () const
|
||||
{
|
||||
if (typL != Contap_Circle) {Standard_DomainError::Raise();}
|
||||
if (typL != Contap_Circle) {throw Standard_DomainError();}
|
||||
return gp_Circ(gp_Ax2(pt,dir1,dir2),rad);
|
||||
}
|
||||
|
@@ -96,25 +96,25 @@ inline Standard_Boolean Contap_Point::IsOnArc () const{
|
||||
|
||||
inline const Handle(Adaptor2d_HCurve2d)& Contap_Point::Arc () const {
|
||||
|
||||
if (!onarc) {Standard_DomainError::Raise();}
|
||||
if (!onarc) {throw Standard_DomainError();}
|
||||
return arc;
|
||||
}
|
||||
|
||||
inline const IntSurf_Transition& Contap_Point::TransitionOnLine () const {
|
||||
|
||||
if (!onarc) {Standard_DomainError::Raise();}
|
||||
if (!onarc) {throw Standard_DomainError();}
|
||||
return traline;
|
||||
}
|
||||
|
||||
inline const IntSurf_Transition& Contap_Point::TransitionOnArc () const {
|
||||
|
||||
if (!onarc) {Standard_DomainError::Raise();}
|
||||
if (!onarc) {throw Standard_DomainError();}
|
||||
return traarc;
|
||||
}
|
||||
|
||||
inline Standard_Real Contap_Point::ParameterOnArc () const {
|
||||
|
||||
if (!onarc) {Standard_DomainError::Raise();}
|
||||
if (!onarc) {throw Standard_DomainError();}
|
||||
return prmarc;
|
||||
}
|
||||
|
||||
@@ -124,6 +124,6 @@ inline Standard_Boolean Contap_Point::IsVertex () const {
|
||||
|
||||
inline const Handle(Adaptor3d_HVertex)& Contap_Point::Vertex () const {
|
||||
|
||||
if (!isvtx) {Standard_DomainError::Raise();}
|
||||
if (!isvtx) {throw Standard_DomainError();}
|
||||
return vtx;
|
||||
}
|
||||
|
@@ -70,13 +70,13 @@ inline Standard_Real Contap_SurfFunction::Tolerance () const
|
||||
|
||||
inline const gp_Vec& Contap_SurfFunction::Direction3d()
|
||||
{
|
||||
if (IsTangent()) StdFail_UndefinedDerivative::Raise();
|
||||
if (IsTangent()) throw StdFail_UndefinedDerivative();
|
||||
return d3d;
|
||||
}
|
||||
|
||||
inline const gp_Dir2d& Contap_SurfFunction::Direction2d()
|
||||
{
|
||||
if (IsTangent()) StdFail_UndefinedDerivative::Raise();
|
||||
if (IsTangent()) throw StdFail_UndefinedDerivative();
|
||||
return d2d;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user