From: kgv Date: Tue, 18 Apr 2017 15:58:12 +0000 (+0300) Subject: 0028550: Foundation Classes - fix empty message passed to thrown exception X-Git-Tag: V7_2_0_beta~173 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=2d2b3d53b7d7e335bb7da8cb53026d38282068bb 0028550: Foundation Classes - fix empty message passed to thrown exception --- diff --git a/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx b/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx index 4f7e429a2c..4c4fa9b832 100644 --- a/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx +++ b/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx @@ -633,8 +633,8 @@ Standard_Integer Adaptor2d_OffsetCurve::NbKnots() const Handle(Geom2d_BezierCurve) Adaptor2d_OffsetCurve::Bezier() const { - Standard_NoSuchObject_Raise_if - ( myOffset != 0.0e0 || GetType() != GeomAbs_BezierCurve, ""); + Standard_NoSuchObject_Raise_if (myOffset != 0.0e0 || GetType() != GeomAbs_BezierCurve, + "Adaptor2d_OffsetCurve::Bezier() - wrong curve type"); return myCurve->Bezier(); } @@ -646,10 +646,7 @@ Handle(Geom2d_BezierCurve) Adaptor2d_OffsetCurve::Bezier() const Handle(Geom2d_BSplineCurve) Adaptor2d_OffsetCurve::BSpline() const { - Standard_NoSuchObject_Raise_if - ( myOffset != 0.0e0 || GetType() != GeomAbs_BSplineCurve, ""); - + Standard_NoSuchObject_Raise_if (myOffset != 0.0e0 || GetType() != GeomAbs_BSplineCurve, + "Adaptor2d_OffsetCurve::BSpline() - wrong curve type"); return myCurve->BSpline(); } - - diff --git a/src/AppParCurves/AppParCurves_MultiPoint.cxx b/src/AppParCurves/AppParCurves_MultiPoint.cxx index 1103f9ed9e..c4aa1ca637 100644 --- a/src/AppParCurves/AppParCurves_MultiPoint.cxx +++ b/src/AppParCurves/AppParCurves_MultiPoint.cxx @@ -138,42 +138,34 @@ void AppParCurves_MultiPoint::Transform2d(const Standard_Integer CuIndex, SetPoint2d(CuIndex, newP); } - - - - void AppParCurves_MultiPoint::SetPoint (const Standard_Integer Index, const gp_Pnt& Point) { - Standard_OutOfRange_Raise_if((Index <= 0) || (Index > nbP), ""); + Standard_OutOfRange_Raise_if ((Index <= 0) || (Index > nbP), + "AppParCurves_MultiPoint::SetPoint() - wrong index"); tabPoint->SetValue(Index, Point); } - const gp_Pnt& AppParCurves_MultiPoint::Point (const Standard_Integer Index) const { - Standard_OutOfRange_Raise_if((Index <= 0) || (Index > nbP), ""); + Standard_OutOfRange_Raise_if ((Index <= 0) || (Index > nbP), + "AppParCurves_MultiPoint::Point() - wrong index"); return tabPoint->Value(Index); } - - void AppParCurves_MultiPoint::SetPoint2d (const Standard_Integer Index, const gp_Pnt2d& Point) { - Standard_OutOfRange_Raise_if((Index <= nbP) || (Index > nbP+nbP2d), ""); + Standard_OutOfRange_Raise_if ((Index <= nbP) || (Index > nbP+nbP2d), + "AppParCurves_MultiPoint::SetPoint2d() - wrong index"); tabPoint2d->SetValue(Index-nbP, Point); } - const gp_Pnt2d& AppParCurves_MultiPoint::Point2d (const Standard_Integer Index) const { - Standard_OutOfRange_Raise_if((Index <= nbP) || (Index > nbP+nbP2d), ""); + Standard_OutOfRange_Raise_if ((Index <= nbP) || (Index > nbP+nbP2d), + "AppParCurves_MultiPoint::Point2d() - wrong index"); return tabPoint2d->Value(Index-nbP); } - - - - void AppParCurves_MultiPoint::Dump(Standard_OStream& o) const { diff --git a/src/BOPAlgo/BOPAlgo_Algo.cxx b/src/BOPAlgo/BOPAlgo_Algo.cxx index 0a73b8b611..efb4a9b3c7 100644 --- a/src/BOPAlgo/BOPAlgo_Algo.cxx +++ b/src/BOPAlgo/BOPAlgo_Algo.cxx @@ -173,7 +173,7 @@ void BOPAlgo_Algo::UserBreak() const return; } if (myProgressIndicator->UserBreak()) { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("BOPAlgo_Algo::UserBreak(), method is not implemented"); } } // myErrorStatus diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Algo.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Algo.cxx index d43d83190a..c5c9ce5886 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Algo.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Algo.cxx @@ -111,7 +111,7 @@ void BRepAlgoAPI_Algo::UserBreak() const return; } if (myProgressIndicator->UserBreak()) { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("BRepAlgoAPI_Algo::UserBreak(), method is not implemented"); } } //======================================================================= diff --git a/src/BRepFill/BRepFill_OffsetAncestors.cxx b/src/BRepFill/BRepFill_OffsetAncestors.cxx index 8dedbfc21a..efd6e3101d 100644 --- a/src/BRepFill/BRepFill_OffsetAncestors.cxx +++ b/src/BRepFill/BRepFill_OffsetAncestors.cxx @@ -106,6 +106,6 @@ const const TopoDS_Shape& BRepFill_OffsetAncestors::Ancestor(const TopoDS_Edge& S1) const { - StdFail_NotDone_Raise_if( !myIsPerform, ""); + StdFail_NotDone_Raise_if (!myIsPerform, "BRepFill_OffsetAncestors::Ancestor() - Perform() should be called before accessing results"); return myMap(S1); } diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx index 67bf88068f..3945720967 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx @@ -122,7 +122,8 @@ void BRepOffsetAPI_DraftAngle::Add(const TopoDS_Face& F, // POP-DPF : protection if ( Abs(Angle) <= 1.e-04 ) return; - Standard_NullObject_Raise_if(myInitialShape.IsNull(),""); + Standard_NullObject_Raise_if (myInitialShape.IsNull(), + "BRepOffsetAPI_DraftAngle::Add() - initial shape is not set"); Handle(Draft_Modification)::DownCast (myModification)->Add(F,D,Angle,Plane, Flag); } @@ -134,7 +135,8 @@ void BRepOffsetAPI_DraftAngle::Add(const TopoDS_Face& F, Standard_Boolean BRepOffsetAPI_DraftAngle::AddDone () const { - Standard_NullObject_Raise_if(myInitialShape.IsNull(),""); + Standard_NullObject_Raise_if (myInitialShape.IsNull(), + "BRepOffsetAPI_DraftAngle::AddDone() - initial shape is not set"); return Handle(Draft_Modification)::DownCast (myModification) ->ProblematicShape().IsNull(); } @@ -147,7 +149,8 @@ Standard_Boolean BRepOffsetAPI_DraftAngle::AddDone () const void BRepOffsetAPI_DraftAngle::Remove(const TopoDS_Face& F) { - Standard_NullObject_Raise_if(myInitialShape.IsNull(),""); + Standard_NullObject_Raise_if (myInitialShape.IsNull(), + "BRepOffsetAPI_DraftAngle::Remove() - initial shape is not set"); Handle(Draft_Modification)::DownCast (myModification)->Remove(F); } @@ -159,7 +162,8 @@ void BRepOffsetAPI_DraftAngle::Remove(const TopoDS_Face& F) const TopoDS_Shape& BRepOffsetAPI_DraftAngle::ProblematicShape () const { - Standard_NullObject_Raise_if(myInitialShape.IsNull(),""); + Standard_NullObject_Raise_if (myInitialShape.IsNull(), + "BRepOffsetAPI_DraftAngle::ProblematicShape() - initial shape is not set"); return Handle(Draft_Modification)::DownCast (myModification)->ProblematicShape(); } @@ -171,7 +175,8 @@ const TopoDS_Shape& BRepOffsetAPI_DraftAngle::ProblematicShape () const Draft_ErrorStatus BRepOffsetAPI_DraftAngle::Status () const { - Standard_NullObject_Raise_if(myInitialShape.IsNull(),""); + Standard_NullObject_Raise_if (myInitialShape.IsNull(), + "BRepOffsetAPI_DraftAngle::Status() - initial shape is not set"); return Handle(Draft_Modification)::DownCast (myModification)->Error(); } @@ -184,7 +189,8 @@ Draft_ErrorStatus BRepOffsetAPI_DraftAngle::Status () const const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::ConnectedFaces (const TopoDS_Face& F) const { - Standard_NullObject_Raise_if(myInitialShape.IsNull(),""); + Standard_NullObject_Raise_if (myInitialShape.IsNull(), + "BRepOffsetAPI_DraftAngle::ConnectedFaces() - initial shape is not set"); return Handle(Draft_Modification)::DownCast (myModification)->ConnectedFaces(F); } @@ -196,7 +202,8 @@ const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::ConnectedFaces const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::ModifiedFaces() const { - Standard_NullObject_Raise_if(myInitialShape.IsNull(),""); + Standard_NullObject_Raise_if (myInitialShape.IsNull(), + "BRepOffsetAPI_DraftAngle::ModifiedFaces() - initial shape is not set"); return Handle(Draft_Modification)::DownCast (myModification)->ModifiedFaces(); } @@ -208,7 +215,8 @@ const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::ModifiedFaces() const const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::Generated(const TopoDS_Shape& S) { myGenerated.Clear(); - Standard_NullObject_Raise_if(myInitialShape.IsNull(),""); + Standard_NullObject_Raise_if (myInitialShape.IsNull(), + "BRepOffsetAPI_DraftAngle::Generated() - initial shape is not set"); Handle(Draft_Modification) DMod = Handle(Draft_Modification)::DownCast (myModification); if (S.ShapeType() == TopAbs_FACE) { @@ -238,7 +246,8 @@ const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::Generated(const TopoDS_Sha const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::Modified(const TopoDS_Shape& S) { myGenerated.Clear(); - Standard_NullObject_Raise_if(myInitialShape.IsNull(),""); + Standard_NullObject_Raise_if (myInitialShape.IsNull(), + "BRepOffsetAPI_DraftAngle::Modified() - initial shape is not set"); Handle(Draft_Modification) DMod = Handle(Draft_Modification)::DownCast (myModification); if (S.ShapeType() == TopAbs_FACE) { diff --git a/src/CPnts/CPnts_AbscissaPoint.lxx b/src/CPnts/CPnts_AbscissaPoint.lxx index 73022af94b..7be5545f2d 100644 --- a/src/CPnts/CPnts_AbscissaPoint.lxx +++ b/src/CPnts/CPnts_AbscissaPoint.lxx @@ -31,7 +31,7 @@ inline Standard_Boolean CPnts_AbscissaPoint::IsDone() const inline Standard_Real CPnts_AbscissaPoint::Parameter() const { - StdFail_NotDone_Raise_if(!myDone, ""); + StdFail_NotDone_Raise_if (!myDone, "CPnts_AbscissaPoint::Parameter() - no result"); return myParam; } diff --git a/src/CPnts/CPnts_UniformDeflection.lxx b/src/CPnts/CPnts_UniformDeflection.lxx index 70bcd3f0ff..bac4ca1d78 100644 --- a/src/CPnts/CPnts_UniformDeflection.lxx +++ b/src/CPnts/CPnts_UniformDeflection.lxx @@ -32,7 +32,7 @@ inline Standard_Boolean CPnts_UniformDeflection::IsAllDone () const inline void CPnts_UniformDeflection::Next() { - Standard_OutOfRange_Raise_if(myIPoint >= myNbPoints, ""); + Standard_OutOfRange_Raise_if(myIPoint >= myNbPoints, "CPnts_UniformDeflection::Next() - no more points available"); myIPoint++; } @@ -43,7 +43,7 @@ inline void CPnts_UniformDeflection::Next() inline Standard_Real CPnts_UniformDeflection::Value () const { - StdFail_NotDone_Raise_if(!myDone, ""); + StdFail_NotDone_Raise_if (!myDone, "CPnts_UniformDeflection::Value() - no result"); return myParams[myIPoint + 1]; } //======================================================================= @@ -53,6 +53,6 @@ inline Standard_Real CPnts_UniformDeflection::Value () const inline gp_Pnt CPnts_UniformDeflection::Point () const { - StdFail_NotDone_Raise_if(!myDone, ""); + StdFail_NotDone_Raise_if (!myDone, "CPnts_UniformDeflection::Point() - no result"); return myPoints[myIPoint + 1]; } diff --git a/src/ChFi3d/ChFi3d_Builder_0.cxx b/src/ChFi3d/ChFi3d_Builder_0.cxx index 9cf33a42ad..fd166d3442 100644 --- a/src/ChFi3d/ChFi3d_Builder_0.cxx +++ b/src/ChFi3d/ChFi3d_Builder_0.cxx @@ -2864,7 +2864,7 @@ Standard_Integer ChFi3d_IndexOfSurfData(const TopoDS_Vertex& V1, sens = -1; if(CD->SetOfSurfData().IsNull()) return 0; else if (Vref.IsSame(V1)) Index = CD->SetOfSurfData()->Length(); - else throw Standard_ConstructionError(""); + else throw Standard_ConstructionError ("ChFi3d_IndexOfSurfData() - wrong construction parameters"); } return Index; } @@ -2891,7 +2891,7 @@ TopoDS_Edge ChFi3d_EdgeFromV1(const TopoDS_Vertex& V1, else Vref = TopExp::LastVertex(E1); sens = -1; if (Vref.IsSame(V1)) return E1; - else throw Standard_ConstructionError(""); + else throw Standard_ConstructionError ("ChFi3d_IndexOfSurfData() - wrong construction parameters"); } } //======================================================================= @@ -3815,7 +3815,7 @@ void ChFi3d_Parameters(const Handle(Geom_Surface)& S, { GeomAPI_ProjectPointOnSurf tool(p3d,S); if ( tool.NbPoints() != 1 ) - throw StdFail_NotDone(""); + throw StdFail_NotDone ("ChFi3d_Parameters() - no projection results"); else tool.Parameters(1,u,v); } @@ -3870,12 +3870,12 @@ void ChFi3d_TrimCurve(const Handle(Geom_Curve)& gc, { GeomAPI_ProjectPointOnCurve tool(FirstP,gc); if ( tool.NbPoints() != 1 ) - throw StdFail_NotDone(""); + throw StdFail_NotDone ("ChFi3d_TrimCurve() - no projection results for the first point"); else uf = tool.Parameter(1); tool.Init(LastP,gc); if ( tool.NbPoints() != 1 ) - throw StdFail_NotDone(""); + throw StdFail_NotDone ("ChFi3d_TrimCurve() - no projection results for the second point"); else ul = tool.Parameter(1); } diff --git a/src/ChFi3d/ChFi3d_Builder_1.cxx b/src/ChFi3d/ChFi3d_Builder_1.cxx index d8b9560c36..37f4d2d642 100644 --- a/src/ChFi3d/ChFi3d_Builder_1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_1.cxx @@ -158,7 +158,7 @@ Standard_Boolean ChFi3d_Builder::IsDone() const TopoDS_Shape ChFi3d_Builder::Shape()const { - Standard_NoSuchObject_Raise_if(!done,""); + Standard_NoSuchObject_Raise_if (!done, "ChFi3d_Builder::Shape() - no result"); return myShapeResult; } @@ -292,7 +292,7 @@ Standard_Boolean ChFi3d_Builder::HasResult() const TopoDS_Shape ChFi3d_Builder::BadShape()const { - Standard_NoSuchObject_Raise_if(!hasresult,""); + Standard_NoSuchObject_Raise_if (!hasresult, "ChFi3d_Builder::BadShape() - no result"); return badShape; } diff --git a/src/GC/GC_MakeArcOfCircle.cxx b/src/GC/GC_MakeArcOfCircle.cxx index f7ee342047..7e2b2f58fd 100644 --- a/src/GC/GC_MakeArcOfCircle.cxx +++ b/src/GC/GC_MakeArcOfCircle.cxx @@ -163,6 +163,7 @@ GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Circ& Circ , //======================================================================= const Handle(Geom_TrimmedCurve)& GC_MakeArcOfCircle::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeArcOfCircle::Value() - no result"); return TheArc; } diff --git a/src/GC/GC_MakeArcOfEllipse.cxx b/src/GC/GC_MakeArcOfEllipse.cxx index e776cc2819..92a1961765 100644 --- a/src/GC/GC_MakeArcOfEllipse.cxx +++ b/src/GC/GC_MakeArcOfEllipse.cxx @@ -58,6 +58,7 @@ GC_MakeArcOfEllipse::GC_MakeArcOfEllipse(const gp_Elips& Elips , const Handle(Geom_TrimmedCurve)& GC_MakeArcOfEllipse::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeArcOfEllipse::Value() - no result"); return TheArc; } diff --git a/src/GC/GC_MakeArcOfHyperbola.cxx b/src/GC/GC_MakeArcOfHyperbola.cxx index 72a5c0ef65..8cabadf1db 100644 --- a/src/GC/GC_MakeArcOfHyperbola.cxx +++ b/src/GC/GC_MakeArcOfHyperbola.cxx @@ -59,6 +59,7 @@ GC_MakeArcOfHyperbola::GC_MakeArcOfHyperbola(const gp_Hypr& Hypr , const Handle(Geom_TrimmedCurve)& GC_MakeArcOfHyperbola::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeArcOfHyperbola::Value() - no result"); return TheArc; } diff --git a/src/GC/GC_MakeArcOfParabola.cxx b/src/GC/GC_MakeArcOfParabola.cxx index 020413b669..bc0c7a239e 100644 --- a/src/GC/GC_MakeArcOfParabola.cxx +++ b/src/GC/GC_MakeArcOfParabola.cxx @@ -58,6 +58,7 @@ GC_MakeArcOfParabola::GC_MakeArcOfParabola(const gp_Parab& Parab , const Handle(Geom_TrimmedCurve)& GC_MakeArcOfParabola::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeArcOfParabola::Value() - no result"); return TheArc; } diff --git a/src/GC/GC_MakeCircle.cxx b/src/GC/GC_MakeCircle.cxx index 2eaa21cc64..1895305601 100644 --- a/src/GC/GC_MakeCircle.cxx +++ b/src/GC/GC_MakeCircle.cxx @@ -104,6 +104,7 @@ GC_MakeCircle::GC_MakeCircle(const gp_Ax1& Axis , const Handle(Geom_Circle)& GC_MakeCircle::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeCircle::Value() - no result"); return TheCircle; } diff --git a/src/GC/GC_MakeConicalSurface.cxx b/src/GC/GC_MakeConicalSurface.cxx index cca19ca0e8..0c7df9f247 100644 --- a/src/GC/GC_MakeConicalSurface.cxx +++ b/src/GC/GC_MakeConicalSurface.cxx @@ -84,6 +84,7 @@ GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Pnt& P1 , const Handle(Geom_ConicalSurface)& GC_MakeConicalSurface::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeConicalSurface::Value() - no result"); return TheCone; } diff --git a/src/GC/GC_MakeCylindricalSurface.cxx b/src/GC/GC_MakeCylindricalSurface.cxx index 7d3c1fa810..b364bae0af 100644 --- a/src/GC/GC_MakeCylindricalSurface.cxx +++ b/src/GC/GC_MakeCylindricalSurface.cxx @@ -105,6 +105,7 @@ GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Cylinder& Cyl , const Handle(Geom_CylindricalSurface)& GC_MakeCylindricalSurface::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeCylindricalSurface::Value() - no result"); return TheCylinder; } diff --git a/src/GC/GC_MakeEllipse.cxx b/src/GC/GC_MakeEllipse.cxx index fde6969ad1..c97a7005ab 100644 --- a/src/GC/GC_MakeEllipse.cxx +++ b/src/GC/GC_MakeEllipse.cxx @@ -53,6 +53,7 @@ GC_MakeEllipse::GC_MakeEllipse(const gp_Pnt& S1 , const Handle(Geom_Ellipse)& GC_MakeEllipse::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeEllipse::Value() - no result"); return TheEllipse; } diff --git a/src/GC/GC_MakeHyperbola.cxx b/src/GC/GC_MakeHyperbola.cxx index 1181d12ff3..da621ab680 100644 --- a/src/GC/GC_MakeHyperbola.cxx +++ b/src/GC/GC_MakeHyperbola.cxx @@ -52,6 +52,7 @@ GC_MakeHyperbola::GC_MakeHyperbola(const gp_Pnt& S1 , const Handle(Geom_Hyperbola)& GC_MakeHyperbola::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeHyperbola::Value() - no result"); return TheHyperbola; } diff --git a/src/GC/GC_MakeLine.cxx b/src/GC/GC_MakeLine.cxx index 8fdf360544..05ab8e0288 100644 --- a/src/GC/GC_MakeLine.cxx +++ b/src/GC/GC_MakeLine.cxx @@ -68,6 +68,7 @@ GC_MakeLine::GC_MakeLine(const gp_Lin& Lin , const Handle(Geom_Line)& GC_MakeLine::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeLine::Value() - no result"); return TheLine; } diff --git a/src/GC/GC_MakePlane.cxx b/src/GC/GC_MakePlane.cxx index 9034c5fcc9..398d758398 100644 --- a/src/GC/GC_MakePlane.cxx +++ b/src/GC/GC_MakePlane.cxx @@ -120,6 +120,7 @@ GC_MakePlane::GC_MakePlane(const gp_Ax1& Axis ) { const Handle(Geom_Plane)& GC_MakePlane::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakePlane::Value() - no result"); return ThePlane; } diff --git a/src/GC/GC_MakeSegment.cxx b/src/GC/GC_MakeSegment.cxx index 77da42fc71..7b0c93f0aa 100644 --- a/src/GC/GC_MakeSegment.cxx +++ b/src/GC/GC_MakeSegment.cxx @@ -65,6 +65,7 @@ GC_MakeSegment::GC_MakeSegment(const gp_Lin& Line , const Handle(Geom_TrimmedCurve)& GC_MakeSegment::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeSegment::Value() - no result"); return TheSegment; } diff --git a/src/GC/GC_MakeTrimmedCone.cxx b/src/GC/GC_MakeTrimmedCone.cxx index 7b0822b23e..3b7d326aee 100644 --- a/src/GC/GC_MakeTrimmedCone.cxx +++ b/src/GC/GC_MakeTrimmedCone.cxx @@ -74,6 +74,7 @@ GC_MakeTrimmedCone::GC_MakeTrimmedCone(const gp_Pnt& P1 , const Handle(Geom_RectangularTrimmedSurface)& GC_MakeTrimmedCone:: Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeTrimmedCone::Value() - no result"); return TheCone; } diff --git a/src/GC/GC_MakeTrimmedCylinder.cxx b/src/GC/GC_MakeTrimmedCylinder.cxx index cdcf287444..e13106bf81 100644 --- a/src/GC/GC_MakeTrimmedCylinder.cxx +++ b/src/GC/GC_MakeTrimmedCylinder.cxx @@ -74,6 +74,7 @@ GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Ax1& A1 , const Handle(Geom_RectangularTrimmedSurface)& GC_MakeTrimmedCylinder:: Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GC_MakeTrimmedCylinder::Value() - no result"); return TheCyl; } diff --git a/src/GCE2d/GCE2d_MakeArcOfCircle.cxx b/src/GCE2d/GCE2d_MakeArcOfCircle.cxx index 192db9a13d..9a68d6796e 100644 --- a/src/GCE2d/GCE2d_MakeArcOfCircle.cxx +++ b/src/GCE2d/GCE2d_MakeArcOfCircle.cxx @@ -114,6 +114,7 @@ GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Circ2d& Circ , const Handle(Geom2d_TrimmedCurve)& GCE2d_MakeArcOfCircle::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GCE2d_MakeArcOfCircle::Value() - no result"); return TheArc; } diff --git a/src/GCE2d/GCE2d_MakeArcOfEllipse.cxx b/src/GCE2d/GCE2d_MakeArcOfEllipse.cxx index 1c8a520675..4621bd50cd 100644 --- a/src/GCE2d/GCE2d_MakeArcOfEllipse.cxx +++ b/src/GCE2d/GCE2d_MakeArcOfEllipse.cxx @@ -58,6 +58,7 @@ GCE2d_MakeArcOfEllipse::GCE2d_MakeArcOfEllipse(const gp_Elips2d& Elips , const Handle(Geom2d_TrimmedCurve)& GCE2d_MakeArcOfEllipse::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GCE2d_MakeArcOfEllipse::Value() - no result"); return TheArc; } diff --git a/src/GCE2d/GCE2d_MakeArcOfHyperbola.cxx b/src/GCE2d/GCE2d_MakeArcOfHyperbola.cxx index 6f3a17d634..b9fc62b3cb 100644 --- a/src/GCE2d/GCE2d_MakeArcOfHyperbola.cxx +++ b/src/GCE2d/GCE2d_MakeArcOfHyperbola.cxx @@ -60,6 +60,7 @@ GCE2d_MakeArcOfHyperbola:: const Handle(Geom2d_TrimmedCurve)& GCE2d_MakeArcOfHyperbola::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GCE2d_MakeArcOfHyperbola::Value() - no result"); return TheArc; } diff --git a/src/GCE2d/GCE2d_MakeArcOfParabola.cxx b/src/GCE2d/GCE2d_MakeArcOfParabola.cxx index b1a4f5924a..ac36dd5966 100644 --- a/src/GCE2d/GCE2d_MakeArcOfParabola.cxx +++ b/src/GCE2d/GCE2d_MakeArcOfParabola.cxx @@ -59,6 +59,7 @@ GCE2d_MakeArcOfParabola:: const Handle(Geom2d_TrimmedCurve)& GCE2d_MakeArcOfParabola::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GCE2d_MakeArcOfParabola::Value() - no result"); return TheArc; } diff --git a/src/GCE2d/GCE2d_MakeCircle.cxx b/src/GCE2d/GCE2d_MakeCircle.cxx index 435dbb38b2..f94b4a2585 100644 --- a/src/GCE2d/GCE2d_MakeCircle.cxx +++ b/src/GCE2d/GCE2d_MakeCircle.cxx @@ -105,6 +105,7 @@ GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Pnt2d& Center , const Handle(Geom2d_Circle)& GCE2d_MakeCircle::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GCE2d_MakeCircle::Value() - no result"); return TheCircle; } diff --git a/src/GCE2d/GCE2d_MakeEllipse.cxx b/src/GCE2d/GCE2d_MakeEllipse.cxx index a0d0808cf5..77ef40cce0 100644 --- a/src/GCE2d/GCE2d_MakeEllipse.cxx +++ b/src/GCE2d/GCE2d_MakeEllipse.cxx @@ -65,6 +65,7 @@ GCE2d_MakeEllipse::GCE2d_MakeEllipse(const gp_Pnt2d& S1 , const Handle(Geom2d_Ellipse)& GCE2d_MakeEllipse::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GCE2d_MakeEllipse::Value() - no result"); return TheEllipse; } diff --git a/src/GCE2d/GCE2d_MakeHyperbola.cxx b/src/GCE2d/GCE2d_MakeHyperbola.cxx index 3aeb4ea19e..5d9e94536e 100644 --- a/src/GCE2d/GCE2d_MakeHyperbola.cxx +++ b/src/GCE2d/GCE2d_MakeHyperbola.cxx @@ -65,6 +65,7 @@ GCE2d_MakeHyperbola::GCE2d_MakeHyperbola(const gp_Pnt2d& S1 , const Handle(Geom2d_Hyperbola)& GCE2d_MakeHyperbola::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GCE2d_MakeHyperbola::Value() - no result"); return TheHyperbola; } diff --git a/src/GCE2d/GCE2d_MakeLine.cxx b/src/GCE2d/GCE2d_MakeLine.cxx index ebdb75ca2d..c2987dde84 100644 --- a/src/GCE2d/GCE2d_MakeLine.cxx +++ b/src/GCE2d/GCE2d_MakeLine.cxx @@ -78,6 +78,7 @@ GCE2d_MakeLine::GCE2d_MakeLine(const gp_Lin2d& Lin , const Handle(Geom2d_Line)& GCE2d_MakeLine::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GCE2d_MakeLine::Value() - no result"); return TheLine; } diff --git a/src/GCE2d/GCE2d_MakeParabola.cxx b/src/GCE2d/GCE2d_MakeParabola.cxx index e781b7c4df..54561a2a57 100644 --- a/src/GCE2d/GCE2d_MakeParabola.cxx +++ b/src/GCE2d/GCE2d_MakeParabola.cxx @@ -72,6 +72,7 @@ GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Pnt2d& S1 , const Handle(Geom2d_Parabola)& GCE2d_MakeParabola::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GCE2d_MakeParabola::Value() - no result"); return TheParabola; } diff --git a/src/GCE2d/GCE2d_MakeSegment.cxx b/src/GCE2d/GCE2d_MakeSegment.cxx index 87318934b3..3f4832b95b 100644 --- a/src/GCE2d/GCE2d_MakeSegment.cxx +++ b/src/GCE2d/GCE2d_MakeSegment.cxx @@ -82,6 +82,7 @@ GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Lin2d& Line , const Handle(Geom2d_TrimmedCurve)& GCE2d_MakeSegment::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "GCE2d_MakeSegment::Value() - no result"); return TheSegment; } diff --git a/src/GCPnts/GCPnts_QuasiUniformAbscissa.pxx b/src/GCPnts/GCPnts_QuasiUniformAbscissa.pxx index 9ee09125f8..1eda6a64c9 100644 --- a/src/GCPnts/GCPnts_QuasiUniformAbscissa.pxx +++ b/src/GCPnts/GCPnts_QuasiUniformAbscissa.pxx @@ -80,8 +80,10 @@ void GCPnts_QuasiUniformAbscissa::Initialize(const TheCurve& C, // } #endif } - else { - Standard_ConstructionError_Raise_if(NbPoints <= 1, ""); + else + { + Standard_ConstructionError_Raise_if (NbPoints <= 1, + "GCPnts_QuasiUniformAbscissa::Initialize() - number of points should be >= 2"); // evaluate the approximative length of the 3dCurve myNbPoints = NbPoints; diff --git a/src/GCPnts/GCPnts_UniformAbscissa.pxx b/src/GCPnts/GCPnts_UniformAbscissa.pxx index 095739b919..7247fc6699 100644 --- a/src/GCPnts/GCPnts_UniformAbscissa.pxx +++ b/src/GCPnts/GCPnts_UniformAbscissa.pxx @@ -392,7 +392,8 @@ void GCPnts_UniformAbscissa::Initialize(const TheCurve& C, const Standard_Real U2, const Standard_Real Tol) { - Standard_ConstructionError_Raise_if(NbPoints <= 1, ""); + Standard_ConstructionError_Raise_if (NbPoints <= 1, + "GCPnts_UniformAbscissa::Initialize() - number of points should be >= 2"); Standard_Real Abscissa ; myNbPoints = 0 ; myDone = Standard_False; diff --git a/src/Geom/Geom_Direction.cxx b/src/Geom/Geom_Direction.cxx index 7d7aa40433..18e284506d 100644 --- a/src/Geom/Geom_Direction.cxx +++ b/src/Geom/Geom_Direction.cxx @@ -55,7 +55,8 @@ Handle(Geom_Geometry) Geom_Direction::Copy() const { Geom_Direction::Geom_Direction (const Standard_Real X, const Standard_Real Y, const Standard_Real Z) { Standard_Real D = sqrt (X * X + Y * Y + Z * Z); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "Geom_Direction() - input vector has zero length"); gpVec = gp_Vec (X/D, Y/D, Z/D); } @@ -72,7 +73,8 @@ Standard_Real Geom_Direction::SquareMagnitude () const { return 1.0; } void Geom_Direction::SetCoord (const Standard_Real X, const Standard_Real Y, const Standard_Real Z) { Standard_Real D = Sqrt (X * X + Y * Y + Z * Z); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "Geom_Direction::SetCoord() - input vector has zero length"); gpVec = gp_Vec(X/D, Y/D, Z/D); } @@ -80,7 +82,8 @@ void Geom_Direction::SetCoord (const Standard_Real X, const Standard_Real Y, con void Geom_Direction::SetX (const Standard_Real X) { Standard_Real D = Sqrt (X * X + gpVec.Y() * gpVec.Y() + gpVec.Z() * gpVec.Z()); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "Geom_Direction::SetX() - input vector has zero length"); gpVec = gp_Vec (X/D, gpVec.Y()/D, gpVec.Z()/D); } @@ -88,7 +91,8 @@ void Geom_Direction::SetX (const Standard_Real X) { void Geom_Direction::SetY (const Standard_Real Y) { Standard_Real D = Sqrt (gpVec.X() * gpVec.X() + Y * Y + gpVec.Z() * gpVec.Z()); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "Geom_Direction::SetY() - input vector has zero length"); gpVec = gp_Vec (gpVec.X()/D, Y/D, gpVec.Z()/D); } @@ -96,7 +100,8 @@ void Geom_Direction::SetY (const Standard_Real Y) { void Geom_Direction::SetZ (const Standard_Real Z) { Standard_Real D = Sqrt (gpVec.X() * gpVec.X() + gpVec.Y() * gpVec.Y() + Z * Z); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "Geom_Direction::SetZ() - input vector has zero length"); gpVec = gp_Vec (gpVec.X()/D, gpVec.Y()/D, Z/D); } diff --git a/src/Geom2d/Geom2d_Direction.cxx b/src/Geom2d/Geom2d_Direction.cxx index ca933040f2..c01f4917cb 100644 --- a/src/Geom2d/Geom2d_Direction.cxx +++ b/src/Geom2d/Geom2d_Direction.cxx @@ -50,7 +50,8 @@ Handle(Geom2d_Geometry) Geom2d_Direction::Copy() const { Geom2d_Direction::Geom2d_Direction (const Standard_Real X, const Standard_Real Y) { Standard_Real D = Sqrt (X * X + Y * Y); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "Geom2d_Direction() - input vector has zero length"); gpVec2d = gp_Vec2d (X/D, Y/D); } @@ -61,7 +62,8 @@ Geom2d_Direction::Geom2d_Direction (const gp_Dir2d& V) { gpVec2d = V; } void Geom2d_Direction::SetCoord (const Standard_Real X, const Standard_Real Y) { Standard_Real D = Sqrt (X * X + Y * Y); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "Geom2d_Direction::SetCoord() - input vector has zero length"); gpVec2d = gp_Vec2d (X/D, Y/D); } @@ -72,7 +74,8 @@ void Geom2d_Direction::SetDir2d (const gp_Dir2d& V) { gpVec2d = V; } void Geom2d_Direction::SetX (const Standard_Real X) { Standard_Real D = Sqrt(X * X + gpVec2d.Y() * gpVec2d.Y()); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "Geom2d_Direction::SetX() - input vector has zero length"); gpVec2d = gp_Vec2d (X/D, gpVec2d.Y()/D); } @@ -80,7 +83,8 @@ void Geom2d_Direction::SetX (const Standard_Real X) { void Geom2d_Direction::SetY (const Standard_Real Y) { Standard_Real D = Sqrt (gpVec2d.X() * gpVec2d.X() + Y * Y); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "Geom2d_Direction::SetY() - input vector has zero length"); gpVec2d = gp_Vec2d (gpVec2d.X()/D, Y/D); } diff --git a/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx b/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx index 0bf24b44bd..eec601a868 100644 --- a/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx +++ b/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx @@ -317,7 +317,7 @@ void Geom2dAPI_PointsToBSpline::Init const GeomAbs_Shape Continuity, const Standard_Real Tol2D) { - if (Params.Length() != Points.Length()) throw Standard_OutOfRange(""); + if (Params.Length() != Points.Length()) throw Standard_OutOfRange ("Geom2dAPI_PointsToBSpline::Init() - invalid input"); Standard_Real Tol3D = 0.; // dummy argument for BSplineCompute. Standard_Integer Nbp = Params.Length(); diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx index 82cb392a03..389cdce558 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx @@ -847,7 +847,8 @@ Standard_Real Geom2dAdaptor_Curve::Resolution(const Standard_Real Ruv) const { gp_Lin2d Geom2dAdaptor_Curve::Line() const { - Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Line, ""); + Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Line, + "Geom2dAdaptor_Curve::Line() - curve is not a Line"); return Handle(Geom2d_Line)::DownCast (myCurve)->Lin2d(); } @@ -858,7 +859,8 @@ gp_Lin2d Geom2dAdaptor_Curve::Line() const gp_Circ2d Geom2dAdaptor_Curve::Circle() const { - Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Circle, ""); + Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Circle, + "Geom2dAdaptor_Curve::Circle() - curve is not a Circle"); return Handle(Geom2d_Circle)::DownCast (myCurve)->Circ2d(); } @@ -869,7 +871,8 @@ gp_Circ2d Geom2dAdaptor_Curve::Circle() const gp_Elips2d Geom2dAdaptor_Curve::Ellipse() const { - Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Ellipse, ""); + Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Ellipse, + "Geom2dAdaptor_Curve::Ellipse() - curve is not an Ellipse"); return Handle(Geom2d_Ellipse)::DownCast (myCurve)->Elips2d(); } @@ -880,7 +883,8 @@ gp_Elips2d Geom2dAdaptor_Curve::Ellipse() const gp_Hypr2d Geom2dAdaptor_Curve::Hyperbola() const { - Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Hyperbola, ""); + Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Hyperbola, + "Geom2dAdaptor_Curve::Hyperbola() - curve is not a Hyperbola"); return Handle(Geom2d_Hyperbola)::DownCast (myCurve)->Hypr2d(); } @@ -891,7 +895,8 @@ gp_Hypr2d Geom2dAdaptor_Curve::Hyperbola() const gp_Parab2d Geom2dAdaptor_Curve::Parabola() const { - Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Parabola, ""); + Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Parabola, + "Geom2dAdaptor_Curve::Parabola() - curve is not a Parabola"); return Handle(Geom2d_Parabola)::DownCast (myCurve)->Parab2d(); } diff --git a/src/GeomAPI/GeomAPI_PointsToBSpline.cxx b/src/GeomAPI/GeomAPI_PointsToBSpline.cxx index fcec59ffc8..83b385427e 100644 --- a/src/GeomAPI/GeomAPI_PointsToBSpline.cxx +++ b/src/GeomAPI/GeomAPI_PointsToBSpline.cxx @@ -191,7 +191,7 @@ void GeomAPI_PointsToBSpline::Init const GeomAbs_Shape Continuity, const Standard_Real Tol3D) { - if (Params.Length() != Points.Length()) throw Standard_OutOfRange(""); + if (Params.Length() != Points.Length()) throw Standard_OutOfRange ("GeomAPI_PointsToBSpline::Init() - invalid input"); Standard_Real Tol2D = 0.; // dummy argument for BSplineCompute. Standard_Integer Nbp = Params.Length(); diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.cxx b/src/GeomAdaptor/GeomAdaptor_Curve.cxx index 2cb8276460..217891e6fa 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.cxx @@ -825,7 +825,8 @@ Standard_Real GeomAdaptor_Curve::Resolution(const Standard_Real R3D) const gp_Lin GeomAdaptor_Curve::Line() const { - Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Line, ""); + Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Line, + "GeomAdaptor_Curve::Line() - curve is not a Line"); return Handle(Geom_Line)::DownCast (myCurve)->Lin(); } @@ -836,7 +837,8 @@ gp_Lin GeomAdaptor_Curve::Line() const gp_Circ GeomAdaptor_Curve::Circle() const { - Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Circle, ""); + Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Circle, + "GeomAdaptor_Curve::Circle() - curve is not a Circle"); return Handle(Geom_Circle)::DownCast (myCurve)->Circ(); } @@ -847,7 +849,8 @@ gp_Circ GeomAdaptor_Curve::Circle() const gp_Elips GeomAdaptor_Curve::Ellipse() const { - Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Ellipse, ""); + Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Ellipse, + "GeomAdaptor_Curve::Ellipse() - curve is not an Ellipse"); return Handle(Geom_Ellipse)::DownCast (myCurve)->Elips(); } @@ -858,7 +861,8 @@ gp_Elips GeomAdaptor_Curve::Ellipse() const gp_Hypr GeomAdaptor_Curve::Hyperbola() const { - Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Hyperbola, ""); + Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Hyperbola, + "GeomAdaptor_Curve::Hyperbola() - curve is not a Hyperbola"); return Handle(Geom_Hyperbola)::DownCast (myCurve)->Hypr(); } @@ -869,7 +873,8 @@ gp_Hypr GeomAdaptor_Curve::Hyperbola() const gp_Parab GeomAdaptor_Curve::Parabola() const { - Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Parabola, ""); + Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Parabola, + "GeomAdaptor_Curve::Parabola() - curve is not a Parabola"); return Handle(Geom_Parabola)::DownCast (myCurve)->Parab(); } diff --git a/src/GeomConvert/GeomConvert_1.cxx b/src/GeomConvert/GeomConvert_1.cxx index d21ff62531..b8ec250f24 100644 --- a/src/GeomConvert/GeomConvert_1.cxx +++ b/src/GeomConvert/GeomConvert_1.cxx @@ -341,7 +341,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface Precision::IsPositiveInfinite(ULast) || Precision::IsNegativeInfinite(VFirst) || Precision::IsPositiveInfinite(VLast) ) { - throw Standard_DomainError(""); + throw Standard_DomainError ("GeomConvert::SurfaceToBSplineSurface() - infinite surface"); } Handle(Geom_BSplineSurface) TheSurface; diff --git a/src/GeomInt/GeomInt_IntSS.lxx b/src/GeomInt/GeomInt_IntSS.lxx index 95455a6897..91295a10bf 100644 --- a/src/GeomInt/GeomInt_IntSS.lxx +++ b/src/GeomInt/GeomInt_IntSS.lxx @@ -125,7 +125,7 @@ inline GeomInt_IntSS::GeomInt_IntSS () //======================================================================= inline Standard_Integer GeomInt_IntSS::NbBoundaries () const { - StdFail_NotDone_Raise_if(!myIntersector.IsDone(),""); + StdFail_NotDone_Raise_if (!myIntersector.IsDone(), "GeomInt_IntSS::NbBoundaries() - no result"); return myNbrestr; } diff --git a/src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx b/src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx index ac23ccbe6a..b248f2ae77 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx +++ b/src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx @@ -77,6 +77,6 @@ GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement const Handle(StepGeom_Axis1Placement) & GeomToStep_MakeAxis1Placement::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeAxis1Placement::Value() - no result"); return theAxis1Placement; } diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx index 0bfd19eb04..f988c9fdef 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx @@ -109,6 +109,6 @@ GeomToStep_MakeAxis2Placement2d::GeomToStep_MakeAxis2Placement2d const Handle(StepGeom_Axis2Placement2d) & GeomToStep_MakeAxis2Placement2d::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeAxis2Placement2d::Value() - no result"); return theAxis2Placement2d; } diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx index e0ab5b6dae..c8abefb6ff 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx @@ -134,6 +134,6 @@ GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d const Handle(StepGeom_Axis2Placement3d) & GeomToStep_MakeAxis2Placement3d::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeAxis2Placement3d::Value() - no result"); return theAxis2Placement3d; } diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx index 99971416ed..37973471c9 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx @@ -66,6 +66,6 @@ GeomToStep_MakeBSplineCurveWithKnots:: const Handle(StepGeom_BSplineCurveWithKnots) & GeomToStep_MakeBSplineCurveWithKnots::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBSplineCurveWithKnots::Value() - no result"); return theBSplineCurveWithKnots; } diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx index edb9f4e9b5..c04d867bbd 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx @@ -66,6 +66,6 @@ GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve:: const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve) & GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve::Value() - no result"); return theBSplineCurveWithKnotsAndRationalBSplineCurve; } diff --git a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx index 736e02f43a..02cdc589a3 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx @@ -148,6 +148,6 @@ GeomToStep_MakeBSplineSurfaceWithKnots:: const Handle(StepGeom_BSplineSurfaceWithKnots) & GeomToStep_MakeBSplineSurfaceWithKnots::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBSplineSurfaceWithKnots::Value() - no result"); return theBSplineSurfaceWithKnots; } diff --git a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx index 4b405a9421..1e302f7aa2 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx @@ -159,6 +159,6 @@ GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface:: const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) & GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface::Value() - no result"); return theBSplineSurfaceWithKnotsAndRationalBSplineSurface; } diff --git a/src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx b/src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx index 18625fb26c..f1c7a0b56b 100644 --- a/src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx +++ b/src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx @@ -123,6 +123,6 @@ GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom2d_B const Handle(StepGeom_BoundedCurve) & GeomToStep_MakeBoundedCurve::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBoundedCurve::Value() - no result"); return theBoundedCurve; } diff --git a/src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx b/src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx index 69fb11c8d9..006b8d0f0e 100644 --- a/src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx @@ -90,6 +90,6 @@ GeomToStep_MakeBoundedSurface::GeomToStep_MakeBoundedSurface const Handle(StepGeom_BoundedSurface) & GeomToStep_MakeBoundedSurface::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBoundedSurface::Value() - no result"); return theBoundedSurface; } diff --git a/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx b/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx index 6279313567..b6a34ee0a9 100644 --- a/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx +++ b/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx @@ -123,6 +123,6 @@ GeomToStep_MakeCartesianPoint:: const Handle(StepGeom_CartesianPoint) & GeomToStep_MakeCartesianPoint::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeCartesianPoint::Value() - no result"); return theCartesianPoint; } diff --git a/src/GeomToStep/GeomToStep_MakeCircle.cxx b/src/GeomToStep/GeomToStep_MakeCircle.cxx index 0a19c5d2c8..fbd842f39b 100644 --- a/src/GeomToStep/GeomToStep_MakeCircle.cxx +++ b/src/GeomToStep/GeomToStep_MakeCircle.cxx @@ -84,6 +84,6 @@ GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom2d_Circle)& Cer) const Handle(StepGeom_Circle) & GeomToStep_MakeCircle::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeCircle::Value() - no result"); return theCircle; } diff --git a/src/GeomToStep/GeomToStep_MakeConic.cxx b/src/GeomToStep/GeomToStep_MakeConic.cxx index 337f13a9fe..d585b81eb4 100644 --- a/src/GeomToStep/GeomToStep_MakeConic.cxx +++ b/src/GeomToStep/GeomToStep_MakeConic.cxx @@ -115,6 +115,6 @@ GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom2d_Conic)& C) const Handle(StepGeom_Conic) & GeomToStep_MakeConic::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeConic::Value() - no result"); return theConic; } diff --git a/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx b/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx index 85cfc4b938..5f006cf7ce 100644 --- a/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx @@ -58,6 +58,6 @@ GeomToStep_MakeConicalSurface::GeomToStep_MakeConicalSurface const Handle(StepGeom_ConicalSurface) & GeomToStep_MakeConicalSurface::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeConicalSurface::Value() - no result"); return theConicalSurface; } diff --git a/src/GeomToStep/GeomToStep_MakeCurve.cxx b/src/GeomToStep/GeomToStep_MakeCurve.cxx index 8f72a2c96c..69eaa89c03 100644 --- a/src/GeomToStep/GeomToStep_MakeCurve.cxx +++ b/src/GeomToStep/GeomToStep_MakeCurve.cxx @@ -174,6 +174,6 @@ GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom2d_Curve)& C) const Handle(StepGeom_Curve) & GeomToStep_MakeCurve::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeCurve::Value() - no result"); return theCurve; } diff --git a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx index 5e06b12082..df3c1a27a6 100644 --- a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx @@ -53,6 +53,6 @@ GeomToStep_MakeCylindricalSurface::GeomToStep_MakeCylindricalSurface const Handle(StepGeom_CylindricalSurface) & GeomToStep_MakeCylindricalSurface::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeCylindricalSurface::Value() - no result"); return theCylindricalSurface; } diff --git a/src/GeomToStep/GeomToStep_MakeDirection.cxx b/src/GeomToStep/GeomToStep_MakeDirection.cxx index 67bf1d6dc6..8c643ec588 100644 --- a/src/GeomToStep/GeomToStep_MakeDirection.cxx +++ b/src/GeomToStep/GeomToStep_MakeDirection.cxx @@ -115,6 +115,6 @@ GeomToStep_MakeDirection::GeomToStep_MakeDirection const Handle(StepGeom_Direction) & GeomToStep_MakeDirection::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeDirection::Value() - no result"); return theDirection; } diff --git a/src/GeomToStep/GeomToStep_MakeElementarySurface.cxx b/src/GeomToStep/GeomToStep_MakeElementarySurface.cxx index 18b720cbb8..bcfdfb9069 100644 --- a/src/GeomToStep/GeomToStep_MakeElementarySurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeElementarySurface.cxx @@ -84,6 +84,6 @@ GeomToStep_MakeElementarySurface::GeomToStep_MakeElementarySurface const Handle(StepGeom_ElementarySurface) & GeomToStep_MakeElementarySurface::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeElementarySurface::Value() - no result"); return theElementarySurface; } diff --git a/src/GeomToStep/GeomToStep_MakeEllipse.cxx b/src/GeomToStep/GeomToStep_MakeEllipse.cxx index e6a8a91ab4..93441211a3 100644 --- a/src/GeomToStep/GeomToStep_MakeEllipse.cxx +++ b/src/GeomToStep/GeomToStep_MakeEllipse.cxx @@ -85,6 +85,6 @@ GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom2d_Ellipse)& Ce const Handle(StepGeom_Ellipse) & GeomToStep_MakeEllipse::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeEllipse::Value() - no result"); return theEllipse; } diff --git a/src/GeomToStep/GeomToStep_MakeHyperbola.cxx b/src/GeomToStep/GeomToStep_MakeHyperbola.cxx index 892d43a7d7..e5a431ab8c 100644 --- a/src/GeomToStep/GeomToStep_MakeHyperbola.cxx +++ b/src/GeomToStep/GeomToStep_MakeHyperbola.cxx @@ -84,7 +84,7 @@ GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola const Handle(StepGeom_Hyperbola)& GeomToStep_MakeHyperbola::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeHyperbola::Value() - no result"); return theHyperbola; } diff --git a/src/GeomToStep/GeomToStep_MakeLine.cxx b/src/GeomToStep/GeomToStep_MakeLine.cxx index 99efdee53d..f480b372d2 100644 --- a/src/GeomToStep/GeomToStep_MakeLine.cxx +++ b/src/GeomToStep/GeomToStep_MakeLine.cxx @@ -84,7 +84,7 @@ GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom2d_Line)& Gline) const Handle(StepGeom_Line) & GeomToStep_MakeLine::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeLine::Value() - no result"); return theLine; } diff --git a/src/GeomToStep/GeomToStep_MakeParabola.cxx b/src/GeomToStep/GeomToStep_MakeParabola.cxx index 89cd5c13b4..a1053d035d 100644 --- a/src/GeomToStep/GeomToStep_MakeParabola.cxx +++ b/src/GeomToStep/GeomToStep_MakeParabola.cxx @@ -81,7 +81,7 @@ GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& const Handle(StepGeom_Parabola)& GeomToStep_MakeParabola::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeParabola::Value() - no result"); return theParabola; } diff --git a/src/GeomToStep/GeomToStep_MakePlane.cxx b/src/GeomToStep/GeomToStep_MakePlane.cxx index 20e04d9f29..58c6898c55 100644 --- a/src/GeomToStep/GeomToStep_MakePlane.cxx +++ b/src/GeomToStep/GeomToStep_MakePlane.cxx @@ -70,7 +70,7 @@ GeomToStep_MakePlane::GeomToStep_MakePlane( const Handle(Geom_Plane)& Gpln) const Handle(StepGeom_Plane) & GeomToStep_MakePlane::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakePlane::Value() - no result"); return thePlane; } diff --git a/src/GeomToStep/GeomToStep_MakePolyline.cxx b/src/GeomToStep/GeomToStep_MakePolyline.cxx index 88eeaae174..e08d202465 100644 --- a/src/GeomToStep/GeomToStep_MakePolyline.cxx +++ b/src/GeomToStep/GeomToStep_MakePolyline.cxx @@ -51,6 +51,6 @@ GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt2d& P) const Handle(StepGeom_Polyline) & GeomToStep_MakePolyline::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakePolyline::Value() - no result"); return thePolyline; } diff --git a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx index ca1214d150..2f708a2b13 100644 --- a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx @@ -103,6 +103,6 @@ GeomToStep_MakeRectangularTrimmedSurface:: const Handle(StepGeom_RectangularTrimmedSurface) & GeomToStep_MakeRectangularTrimmedSurface::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeRectangularTrimmedSurface::Value() - no result"); return theRectangularTrimmedSurface; } diff --git a/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx b/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx index 52bcc00280..d1bcc2643d 100644 --- a/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx @@ -53,6 +53,6 @@ GeomToStep_MakeSphericalSurface::GeomToStep_MakeSphericalSurface const Handle(StepGeom_SphericalSurface) & GeomToStep_MakeSphericalSurface::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeSphericalSurface::Value() - no result"); return theSphericalSurface; } diff --git a/src/GeomToStep/GeomToStep_MakeSurface.cxx b/src/GeomToStep/GeomToStep_MakeSurface.cxx index c2083f276e..dbfe276129 100644 --- a/src/GeomToStep/GeomToStep_MakeSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeSurface.cxx @@ -85,6 +85,6 @@ GeomToStep_MakeSurface::GeomToStep_MakeSurface ( const Handle(Geom_Surface)& S) const Handle(StepGeom_Surface) & GeomToStep_MakeSurface::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeSurface::Value() - no result"); return theSurface; } diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx index aa97e3aeba..2a33ec167b 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx @@ -58,6 +58,6 @@ GeomToStep_MakeSurfaceOfLinearExtrusion::GeomToStep_MakeSurfaceOfLinearExtrusion const Handle(StepGeom_SurfaceOfLinearExtrusion) & GeomToStep_MakeSurfaceOfLinearExtrusion::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeSurfaceOfLinearExtrusion::Value() - no result"); return theSurfaceOfLinearExtrusion; } diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx index c111ea5f69..9a2193ff38 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx @@ -56,6 +56,6 @@ GeomToStep_MakeSurfaceOfRevolution::GeomToStep_MakeSurfaceOfRevolution const Handle(StepGeom_SurfaceOfRevolution) & GeomToStep_MakeSurfaceOfRevolution::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeSurfaceOfRevolution::Value() - no result"); return theSurfaceOfRevolution; } diff --git a/src/GeomToStep/GeomToStep_MakeSweptSurface.cxx b/src/GeomToStep/GeomToStep_MakeSweptSurface.cxx index 4c729799e7..2020724305 100644 --- a/src/GeomToStep/GeomToStep_MakeSweptSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeSweptSurface.cxx @@ -59,6 +59,6 @@ GeomToStep_MakeSweptSurface::GeomToStep_MakeSweptSurface const Handle(StepGeom_SweptSurface) & GeomToStep_MakeSweptSurface::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeSweptSurface::Value() - no result"); return theSweptSurface; } diff --git a/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx b/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx index c33bab63ea..8809d9ed7a 100644 --- a/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx @@ -54,6 +54,6 @@ GeomToStep_MakeToroidalSurface::GeomToStep_MakeToroidalSurface const Handle(StepGeom_ToroidalSurface) & GeomToStep_MakeToroidalSurface::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeToroidalSurface::Value() - no result"); return theToroidalSurface; } diff --git a/src/GeomToStep/GeomToStep_MakeVector.cxx b/src/GeomToStep/GeomToStep_MakeVector.cxx index cab2ece7a0..6ee9376e8e 100644 --- a/src/GeomToStep/GeomToStep_MakeVector.cxx +++ b/src/GeomToStep/GeomToStep_MakeVector.cxx @@ -83,6 +83,6 @@ GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom2d_Vector)& const Handle(StepGeom_Vector) & GeomToStep_MakeVector::Value() const { - StdFail_NotDone_Raise_if(!done, ""); + StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeVector::Value() - no result"); return theVector; } diff --git a/src/IntWalk/IntWalk_PWalking.hxx b/src/IntWalk/IntWalk_PWalking.hxx index 9dd8ecb6ad..e4dab8ed9a 100644 --- a/src/IntWalk/IntWalk_PWalking.hxx +++ b/src/IntWalk/IntWalk_PWalking.hxx @@ -140,7 +140,8 @@ public: Standard_Real MaxStep(Standard_Integer theIndex) { - Standard_OutOfRange_Raise_if((theIndex < 0) || (theIndex > 3), ""); + Standard_OutOfRange_Raise_if ((theIndex < 0) || (theIndex > 3), + "IntWalk_PWalking::MaxStep() - index is out of range"); return pasInit[theIndex]; } diff --git a/src/LProp/LProp_CLProps.gxx b/src/LProp/LProp_CLProps.gxx index 9d7a059b65..8afa74d53c 100644 --- a/src/LProp/LProp_CLProps.gxx +++ b/src/LProp/LProp_CLProps.gxx @@ -47,7 +47,7 @@ LProp_CLProps::LProp_CLProps (const Standard_Integer N, : myU(RealLast()), myDerOrder(N), myCN(0), myLinTol(Resolution), myTangentStatus (LProp_Undecided) { - Standard_OutOfRange_Raise_if (N < 0 || N > 3, ""); + Standard_OutOfRange_Raise_if (N < 0 || N > 3, "LProp_CLProps() - invalid input"); } void LProp_CLProps::SetParameter(const Standard_Real U) diff --git a/src/NCollection/NCollection_BaseSequence.cxx b/src/NCollection/NCollection_BaseSequence.cxx index 4cf81fefea..69321525d0 100644 --- a/src/NCollection/NCollection_BaseSequence.cxx +++ b/src/NCollection/NCollection_BaseSequence.cxx @@ -365,8 +365,9 @@ void NCollection_BaseSequence::RemoveSeq void NCollection_BaseSequence::RemoveSeq (const Standard_Integer theIndex, NCollection_DelSeqNode fDel) { - Standard_OutOfRange_Raise_if (theIndex <= 0 || theIndex > mySize, ""); - + Standard_OutOfRange_Raise_if (theIndex <= 0 || theIndex > mySize, + "NCollection_BaseSequence::RemoveSeq() - index is out of range"); + NCollection_SeqNode * p = Find (theIndex); if (p->Previous()) p->Previous()->SetNext (p->Next()); @@ -399,7 +400,8 @@ void NCollection_BaseSequence::RemoveSeq (const Standard_Integer From, const Standard_Integer To, NCollection_DelSeqNode fDel) { - Standard_OutOfRange_Raise_if (From <= 0 || To > mySize || From > To, ""); + Standard_OutOfRange_Raise_if (From <= 0 || To > mySize || From > To, + "NCollection_BaseSequence::RemoveSeq() - invalid input range"); NCollection_SeqNode * pfrom = Find(From); NCollection_SeqNode * pto = Find(To); diff --git a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx index 6f4ae797f5..16e1255320 100644 --- a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx +++ b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx @@ -363,7 +363,7 @@ static gp_Pnt2d Function_Value(const Standard_Real theU, } else { - throw Standard_NoSuchObject(""); + throw Standard_NoSuchObject ("ProjLib_ComputeApproxOnPolarSurface::ProjectUsingInitialCurve2d() - unknown surface type"); } // Try to run simple search with initial point (U0, V0). diff --git a/src/ProjLib/ProjLib_ProjectOnPlane.cxx b/src/ProjLib/ProjLib_ProjectOnPlane.cxx index c31d8f6a5a..709687f539 100644 --- a/src/ProjLib/ProjLib_ProjectOnPlane.cxx +++ b/src/ProjLib/ProjLib_ProjectOnPlane.cxx @@ -984,7 +984,7 @@ ProjLib_ProjectOnPlane::Trim(const Standard_Real First, return myResult->Trim(First,Last,Tolerance) ; } else { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectOnPlane::Trim() - curve of unsupported type"); } } diff --git a/src/ProjLib/ProjLib_ProjectedCurve.cxx b/src/ProjLib/ProjLib_ProjectedCurve.cxx index 9f30fd24e2..03ac507ca6 100644 --- a/src/ProjLib/ProjLib_ProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_ProjectedCurve.cxx @@ -786,7 +786,7 @@ Standard_Real ProjLib_ProjectedCurve::LastParameter() const GeomAbs_Shape ProjLib_ProjectedCurve::Continuity() const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Continuity() - method is not implemented"); } @@ -797,7 +797,7 @@ GeomAbs_Shape ProjLib_ProjectedCurve::Continuity() const Standard_Integer ProjLib_ProjectedCurve::NbIntervals(const GeomAbs_Shape ) const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::NbIntervals() - method is not implemented"); } @@ -810,7 +810,7 @@ Standard_Integer ProjLib_ProjectedCurve::NbIntervals(const GeomAbs_Shape ) const void ProjLib_ProjectedCurve::Intervals(TColStd_Array1OfReal& , const GeomAbs_Shape ) const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Intervals() - method is not implemented"); } @@ -821,7 +821,7 @@ void ProjLib_ProjectedCurve::Intervals(TColStd_Array1OfReal& , Standard_Boolean ProjLib_ProjectedCurve::IsClosed() const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::IsClosed() - method is not implemented"); } @@ -843,7 +843,7 @@ Standard_Boolean ProjLib_ProjectedCurve::IsPeriodic() const Standard_Real ProjLib_ProjectedCurve::Period() const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Period() - method is not implemented"); } @@ -854,7 +854,7 @@ Standard_Real ProjLib_ProjectedCurve::Period() const gp_Pnt2d ProjLib_ProjectedCurve::Value(const Standard_Real ) const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Value() - method is not implemented"); } @@ -865,7 +865,7 @@ gp_Pnt2d ProjLib_ProjectedCurve::Value(const Standard_Real ) const void ProjLib_ProjectedCurve::D0(const Standard_Real , gp_Pnt2d& ) const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::D0() - method is not implemented"); } @@ -878,7 +878,7 @@ void ProjLib_ProjectedCurve::D1(const Standard_Real , gp_Pnt2d& , gp_Vec2d& ) const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::D1() - method is not implemented"); } @@ -892,7 +892,7 @@ void ProjLib_ProjectedCurve::D2(const Standard_Real , gp_Vec2d& , gp_Vec2d& ) const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::D2() - method is not implemented"); } @@ -907,7 +907,7 @@ void ProjLib_ProjectedCurve::D3(const Standard_Real, gp_Vec2d&, gp_Vec2d&) const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::D3() - method is not implemented"); } @@ -919,7 +919,7 @@ void ProjLib_ProjectedCurve::D3(const Standard_Real, gp_Vec2d ProjLib_ProjectedCurve::DN(const Standard_Real, const Standard_Integer) const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::DN() - method is not implemented"); } @@ -930,7 +930,7 @@ gp_Vec2d ProjLib_ProjectedCurve::DN(const Standard_Real, Standard_Real ProjLib_ProjectedCurve::Resolution(const Standard_Real) const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Resolution() - method is not implemented"); } @@ -1110,6 +1110,5 @@ Handle(Adaptor2d_HCurve2d) ProjLib_ProjectedCurve::Trim const Standard_Real , const Standard_Real ) const { - throw Standard_NotImplemented(""); + throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Trim() - method is not implemented"); } - diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.cxx b/src/StepToTopoDS/StepToTopoDS_Builder.cxx index f7093f1871..9de804bcb0 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.cxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.cxx @@ -861,7 +861,7 @@ void StepToTopoDS_Builder::Init const TopoDS_Shape& StepToTopoDS_Builder::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "StepToTopoDS_Builder::Value() - no result"); return myResult; } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx index 83034c2c96..8c2bed4f19 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx @@ -509,7 +509,7 @@ Handle(Geom2d_Curve) StepToTopoDS_TranslateEdge::MakePCurve const TopoDS_Shape& StepToTopoDS_TranslateEdge::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateEdge::Value() - no result"); return myResult; } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx index ab911b4290..b2b17747bc 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx @@ -696,7 +696,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac const TopoDS_Shape& StepToTopoDS_TranslateEdgeLoop::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateEdgeLoop::Value() - no result"); return myResult; } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index e710c762a9..6de7d28d34 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -378,7 +378,7 @@ void StepToTopoDS_TranslateFace::Init const TopoDS_Shape& StepToTopoDS_TranslateFace::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateFace::Value() - no result"); return myResult; } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx index bdf0083174..eac359b9e3 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx @@ -182,7 +182,7 @@ void StepToTopoDS_TranslatePolyLoop::Init(const Handle(StepShape_PolyLoop)& PL, const TopoDS_Shape& StepToTopoDS_TranslatePolyLoop::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslatePolyLoop::Value() - no result"); return myResult; } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx index b9eab17458..2ad083fde0 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx @@ -123,7 +123,7 @@ void StepToTopoDS_TranslateShell::Init const TopoDS_Shape& StepToTopoDS_TranslateShell::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateShell::Value() - no result"); return myResult; } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx index 9d7cf98c61..5f22e4f3a5 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx @@ -125,7 +125,7 @@ void StepToTopoDS_TranslateVertex::Init(const Handle(StepShape_Vertex)& aVertex, const TopoDS_Shape& StepToTopoDS_TranslateVertex::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateVertex::Value() - no result"); return myResult; } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.cxx index 39b85fc2f3..947c442f23 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.cxx @@ -112,7 +112,7 @@ void StepToTopoDS_TranslateVertexLoop::Init(const Handle(StepShape_VertexLoop)& const TopoDS_Shape& StepToTopoDS_TranslateVertexLoop::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateVertexLoop::Value() - no result"); return myResult; } diff --git a/src/TCollection/TCollection_Sequence.gxx b/src/TCollection/TCollection_Sequence.gxx index fa9b28a479..9644025275 100644 --- a/src/TCollection/TCollection_Sequence.gxx +++ b/src/TCollection/TCollection_Sequence.gxx @@ -88,7 +88,7 @@ void TCollection_Sequence::Prepend(const SeqItem& T) void TCollection_Sequence::InsertAfter(const Standard_Integer Index, const SeqItem& T) { - Standard_OutOfRange_Raise_if ( Index < 0 || Index > Size, ""); + Standard_OutOfRange_Raise_if (Index < 0 || Index > Size, "TCollection_Sequence::InsertAfter() - index is out of range"); TCollection_SequenceNode* newnode = new TCollection_SequenceNode(T,(TCollection_SeqNode*)0L,(TCollection_SeqNode*)0L); PInsertAfter (Index,(void*)newnode); } @@ -99,7 +99,7 @@ void TCollection_Sequence::InsertAfter(const Standard_Integer Index, // ---------------------------------------------------- const SeqItem& TCollection_Sequence::First() const { - Standard_NoSuchObject_Raise_if(Size == 0,""); + Standard_NoSuchObject_Raise_if (Size == 0, "TCollection_Sequence::First() - sequence is empty"); return ((TCollection_SequenceNode*) FirstItem)->Value(); } @@ -109,7 +109,7 @@ const SeqItem& TCollection_Sequence::First() const // ---------------------------------------------------- const SeqItem& TCollection_Sequence::Last() const { - Standard_NoSuchObject_Raise_if(Size == 0,""); + Standard_NoSuchObject_Raise_if (Size == 0, "TCollection_Sequence::Last() - sequence is empty"); return ((TCollection_SequenceNode*) LastItem)->Value(); } @@ -118,7 +118,7 @@ const SeqItem& TCollection_Sequence::Last() const // ----------------------------------------- const SeqItem& TCollection_Sequence::Value(const Standard_Integer Index) const { - Standard_OutOfRange_Raise_if(Index <= 0 || Index > Size,""); + Standard_OutOfRange_Raise_if (Index <= 0 || Index > Size, "TCollection_Sequence::Value() - index is out of range"); TCollection_Sequence* const aLocalTHIS = (TCollection_Sequence* const) this; aLocalTHIS->CurrentItem = (TCollection_SequenceNode*) Find(Index); aLocalTHIS->CurrentIndex = Index; @@ -130,7 +130,7 @@ const SeqItem& TCollection_Sequence::Value(const Standard_Integer Index) const // ------------------------------------------------------- SeqItem & TCollection_Sequence::ChangeValue(const Standard_Integer Index) { - Standard_OutOfRange_Raise_if(Index <= 0 || Index > Size,""); + Standard_OutOfRange_Raise_if (Index <= 0 || Index > Size, "TCollection_Sequence::ChangeValue() - index is out of range"); CurrentItem = (TCollection_SequenceNode*) Find(Index); CurrentIndex = Index; diff --git a/src/TDocStd/TDocStd_XLinkIterator.cxx b/src/TDocStd/TDocStd_XLinkIterator.cxx index b080339402..d5666e9e90 100644 --- a/src/TDocStd/TDocStd_XLinkIterator.cxx +++ b/src/TDocStd/TDocStd_XLinkIterator.cxx @@ -61,7 +61,7 @@ void TDocStd_XLinkIterator::Initialize(const Handle(TDocStd_Document)& DOC) void TDocStd_XLinkIterator::Next() { - if (myValue == NULL) throw Standard_NoMoreObject(""); + if (myValue == NULL) throw Standard_NoMoreObject ("TDocStd_XLinkIterator::Next() - no more values available"); else myValue = myValue->Next(); } diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.cxx b/src/TopoDSToStep/TopoDSToStep_Builder.cxx index 7bae989386..850c1bad97 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.cxx @@ -204,7 +204,7 @@ void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_Builder::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_Builder::Value() - no result"); return myResult; } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx index 491e668066..2a3631c04e 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx @@ -162,6 +162,6 @@ TopoDSToStep_MakeBrepWithVoids:: const Handle(StepShape_BrepWithVoids) & TopoDSToStep_MakeBrepWithVoids::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeBrepWithVoids::Value() - no result"); return theBrepWithVoids; } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx index 94bb2c8e17..7c2b382500 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx @@ -134,6 +134,6 @@ TopoDSToStep_MakeFacetedBrep:: const Handle(StepShape_FacetedBrep) & TopoDSToStep_MakeFacetedBrep::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeFacetedBrep::Value() - no result"); return theFacetedBrep; } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx index 601265d9b3..29d859f1bf 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx @@ -124,6 +124,6 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: const Handle(StepShape_FacetedBrepAndBrepWithVoids) & TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::Value() - no result"); return theFacetedBrepAndBrepWithVoids; } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx index ed2b639ebf..4612f7f308 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx @@ -72,7 +72,7 @@ TopoDSToStep_MakeGeometricCurveSet::TopoDSToStep_MakeGeometricCurveSet( const Handle(StepShape_GeometricCurveSet)& TopoDSToStep_MakeGeometricCurveSet::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeGeometricCurveSet::Value() - no result"); return theGeometricCurveSet; } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx index e555828aa9..a7843567d5 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx @@ -111,6 +111,6 @@ TopoDSToStep_MakeManifoldSolidBrep:: const Handle(StepShape_ManifoldSolidBrep) & TopoDSToStep_MakeManifoldSolidBrep::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeManifoldSolidBrep::Value() - no result"); return theManifoldSolidBrep; } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx index e9d002cd9e..9c4a20022e 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx @@ -205,6 +205,6 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: const Handle(StepShape_ShellBasedSurfaceModel) & TopoDSToStep_MakeShellBasedSurfaceModel::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeShellBasedSurfaceModel::Value() - no result"); return theShellBasedSurfaceModel; } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx index 9852dfb9e6..c8818ecae0 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx @@ -283,7 +283,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepEdge::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeStepEdge::Value() - no result"); return myResult; } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx index 38f7f94d23..f669e70c23 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx @@ -476,7 +476,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepFace::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeStepFace::Value() - no result"); return myResult; } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx index d3b7dc37fa..a7728906c2 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx @@ -109,7 +109,7 @@ void TopoDSToStep_MakeStepVertex::Init(const TopoDS_Vertex& aVertex, const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepVertex::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeStepVertex::Value() - no result"); return myResult; } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx index a6f968117a..3e54c8bfd3 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx @@ -331,7 +331,7 @@ void TopoDSToStep_MakeStepWire::Init(const TopoDS_Wire& aWire, const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepWire::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeStepWire::Value() - no result"); return myResult; } diff --git a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx index 65b0f458df..2d940a7dee 100644 --- a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx @@ -110,7 +110,7 @@ TopoDSToStep_BuilderError TopoDSToStep_WireframeBuilder::Error() const const Handle(TColStd_HSequenceOfTransient)& TopoDSToStep_WireframeBuilder::Value() const { - StdFail_NotDone_Raise_if(!done,""); + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_WireframeBuilder::Value() - no result"); return myResult; } diff --git a/src/gce/gce_MakeCirc.cxx b/src/gce/gce_MakeCirc.cxx index 40c990e34d..99e32446b7 100644 --- a/src/gce/gce_MakeCirc.cxx +++ b/src/gce/gce_MakeCirc.cxx @@ -341,7 +341,8 @@ gce_MakeCirc::gce_MakeCirc(const gp_Circ& Circ , //======================================================================= const gp_Circ& gce_MakeCirc::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeCirc::Value() - no result"); return TheCirc; } //======================================================================= diff --git a/src/gce/gce_MakeCirc2d.cxx b/src/gce/gce_MakeCirc2d.cxx index ea2304bc84..be1ac73768 100644 --- a/src/gce/gce_MakeCirc2d.cxx +++ b/src/gce/gce_MakeCirc2d.cxx @@ -206,7 +206,8 @@ gce_MakeCirc2d::gce_MakeCirc2d(const gp_Circ2d& Circ , const gp_Circ2d& gce_MakeCirc2d::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeCirc2d::Value() - no result"); return TheCirc2d; } diff --git a/src/gce/gce_MakeCone.cxx b/src/gce/gce_MakeCone.cxx index 3fdebda9b6..27c5792c77 100644 --- a/src/gce/gce_MakeCone.cxx +++ b/src/gce/gce_MakeCone.cxx @@ -203,7 +203,8 @@ gce_MakeCone::gce_MakeCone(const gp_Pnt& P1 , const gp_Cone& gce_MakeCone::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeCone::Value() - no result"); return TheCone; } diff --git a/src/gce/gce_MakeCylinder.cxx b/src/gce/gce_MakeCylinder.cxx index 1d4c5a8227..01f1ea7f63 100644 --- a/src/gce/gce_MakeCylinder.cxx +++ b/src/gce/gce_MakeCylinder.cxx @@ -131,7 +131,8 @@ gce_MakeCylinder::gce_MakeCylinder(const gp_Cylinder& Cyl , const gp_Cylinder& gce_MakeCylinder::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeCylinder::Value() - no result"); return TheCylinder; } diff --git a/src/gce/gce_MakeDir.cxx b/src/gce/gce_MakeDir.cxx index 221b3c74ef..a406d85cb5 100644 --- a/src/gce/gce_MakeDir.cxx +++ b/src/gce/gce_MakeDir.cxx @@ -67,7 +67,8 @@ gce_MakeDir::gce_MakeDir(const Standard_Real Xv, const gp_Dir& gce_MakeDir::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeDir::Value() - no result"); return TheDir; } diff --git a/src/gce/gce_MakeDir2d.cxx b/src/gce/gce_MakeDir2d.cxx index 9583929b91..4626cce79e 100644 --- a/src/gce/gce_MakeDir2d.cxx +++ b/src/gce/gce_MakeDir2d.cxx @@ -66,7 +66,8 @@ gce_MakeDir2d::gce_MakeDir2d(const Standard_Real Xv, const gp_Dir2d& gce_MakeDir2d::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeDir2d::Value() - no result"); return TheDir2d; } diff --git a/src/gce/gce_MakeElips.cxx b/src/gce/gce_MakeElips.cxx index 9bb2b26836..0aa76a0914 100644 --- a/src/gce/gce_MakeElips.cxx +++ b/src/gce/gce_MakeElips.cxx @@ -66,7 +66,8 @@ gce_MakeElips::gce_MakeElips(const gp_Pnt& S1 , const gp_Elips& gce_MakeElips::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeElips::Value() - no result"); return TheElips; } diff --git a/src/gce/gce_MakeElips2d.cxx b/src/gce/gce_MakeElips2d.cxx index 7c35d8b838..f8a2138dfd 100644 --- a/src/gce/gce_MakeElips2d.cxx +++ b/src/gce/gce_MakeElips2d.cxx @@ -73,7 +73,8 @@ gce_MakeElips2d::gce_MakeElips2d(const gp_Ax22d& A , const gp_Elips2d& gce_MakeElips2d::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeElips2d::Value() - no result"); return TheElips2d; } diff --git a/src/gce/gce_MakeHypr.cxx b/src/gce/gce_MakeHypr.cxx index 00eb8f0f5f..d35d26a7db 100644 --- a/src/gce/gce_MakeHypr.cxx +++ b/src/gce/gce_MakeHypr.cxx @@ -58,7 +58,8 @@ gce_MakeHypr::gce_MakeHypr(const gp_Ax2& A2 , const gp_Hypr& gce_MakeHypr::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeHypr::Value() - no result"); return TheHypr; } diff --git a/src/gce/gce_MakeHypr2d.cxx b/src/gce/gce_MakeHypr2d.cxx index f49ea0b0db..3e5958be1e 100644 --- a/src/gce/gce_MakeHypr2d.cxx +++ b/src/gce/gce_MakeHypr2d.cxx @@ -71,7 +71,8 @@ gce_MakeHypr2d::gce_MakeHypr2d(const gp_Ax22d& A , const gp_Hypr2d& gce_MakeHypr2d::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeHypr2d::Value() - no result"); return TheHypr2d; } diff --git a/src/gce/gce_MakeLin.cxx b/src/gce/gce_MakeLin.cxx index 7afd3478b6..1a61773d13 100644 --- a/src/gce/gce_MakeLin.cxx +++ b/src/gce/gce_MakeLin.cxx @@ -73,7 +73,8 @@ gce_MakeLin::gce_MakeLin(const gp_Lin& Lin , const gp_Lin& gce_MakeLin::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeLin::Value() - no result"); return TheLin; } diff --git a/src/gce/gce_MakeLin2d.cxx b/src/gce/gce_MakeLin2d.cxx index d207eddca2..363941314b 100644 --- a/src/gce/gce_MakeLin2d.cxx +++ b/src/gce/gce_MakeLin2d.cxx @@ -107,7 +107,8 @@ gce_MakeLin2d::gce_MakeLin2d(const gp_Lin2d& Line, gp_Lin2d gce_MakeLin2d::Value() const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeLin2d::Value() - no result"); return TheLin2d; } diff --git a/src/gce/gce_MakeParab.cxx b/src/gce/gce_MakeParab.cxx index 137245fe31..53b5f13039 100644 --- a/src/gce/gce_MakeParab.cxx +++ b/src/gce/gce_MakeParab.cxx @@ -42,7 +42,8 @@ gce_MakeParab::gce_MakeParab(const gp_Ax1& D , const gp_Parab& gce_MakeParab::Value () const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeParab::Value() - no result"); return TheParab; } diff --git a/src/gce/gce_MakeParab2d.cxx b/src/gce/gce_MakeParab2d.cxx index 94fd8814a5..680ff4156a 100644 --- a/src/gce/gce_MakeParab2d.cxx +++ b/src/gce/gce_MakeParab2d.cxx @@ -73,7 +73,8 @@ gce_MakeParab2d::gce_MakeParab2d(const gp_Pnt2d& S , const gp_Parab2d& gce_MakeParab2d::Value () const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakeParab2d::Value() - no result"); return TheParab2d; } diff --git a/src/gce/gce_MakePln.cxx b/src/gce/gce_MakePln.cxx index f134058bcb..41b724ab85 100644 --- a/src/gce/gce_MakePln.cxx +++ b/src/gce/gce_MakePln.cxx @@ -130,7 +130,8 @@ gce_MakePln::gce_MakePln(const gp_Ax1& Axis ) */ const gp_Pln& gce_MakePln::Value () const { - StdFail_NotDone_Raise_if(TheError != gce_Done,""); + StdFail_NotDone_Raise_if (TheError != gce_Done, + "gce_MakePln::Value() - no result"); return ThePln; } @@ -143,8 +144,3 @@ gce_MakePln::operator gp_Pln() const { return Value(); } - - - - - diff --git a/src/gp/gp_Circ.lxx b/src/gp/gp_Circ.lxx index fab4e0a9c4..39006dc3f1 100644 --- a/src/gp/gp_Circ.lxx +++ b/src/gp/gp_Circ.lxx @@ -23,7 +23,7 @@ inline gp_Circ::gp_Circ () : radius(RealLast()) inline gp_Circ::gp_Circ (const gp_Ax2& A2, const Standard_Real R) : pos(A2), radius(R) { - Standard_ConstructionError_Raise_if (R < 0.0, ""); + Standard_ConstructionError_Raise_if (R < 0.0, "gp_Circ() - radius should be positive number"); } inline void gp_Circ::SetAxis (const gp_Ax1& A1) @@ -37,7 +37,7 @@ inline void gp_Circ::SetPosition (const gp_Ax2& A2) inline void gp_Circ::SetRadius (const Standard_Real R) { - Standard_ConstructionError_Raise_if (R < 0.0, ""); + Standard_ConstructionError_Raise_if (R < 0.0, "gp_Circ::SetRadius() - radius should be positive number"); radius = R; } diff --git a/src/gp/gp_Circ2d.lxx b/src/gp/gp_Circ2d.lxx index 76939e6d60..40aa9587a7 100644 --- a/src/gp/gp_Circ2d.lxx +++ b/src/gp/gp_Circ2d.lxx @@ -21,7 +21,7 @@ inline gp_Circ2d::gp_Circ2d (const gp_Ax2d& XAxis, const Standard_Real Radius, const Standard_Boolean Sense) : radius(Radius) { - Standard_ConstructionError_Raise_if(Radius < 0.0,""); + Standard_ConstructionError_Raise_if (Radius < 0.0, "gp_Circ2d() - radius should be positive number"); pos = gp_Ax22d(XAxis,Sense); } @@ -29,7 +29,9 @@ inline gp_Circ2d::gp_Circ2d (const gp_Ax22d& Axis, const Standard_Real Radius) : pos(Axis), radius(Radius) -{ Standard_ConstructionError_Raise_if(Radius < 0.0,""); } +{ + Standard_ConstructionError_Raise_if (Radius < 0.0, "gp_Circ2d() - radius should be positive number"); +} inline void gp_Circ2d::SetLocation (const gp_Pnt2d& P) { pos.SetLocation (P); } @@ -45,7 +47,7 @@ inline void gp_Circ2d::SetYAxis (const gp_Ax2d& A) inline void gp_Circ2d::SetRadius (const Standard_Real Radius) { - Standard_ConstructionError_Raise_if(Radius < 0.0,""); + Standard_ConstructionError_Raise_if (Radius < 0.0, "gp_Circ2d::SetRadius() - radius should be positive number"); radius = Radius; } diff --git a/src/gp/gp_Cone.lxx b/src/gp/gp_Cone.lxx index 3fbdff6673..3a73a727ed 100644 --- a/src/gp/gp_Cone.lxx +++ b/src/gp/gp_Cone.lxx @@ -32,7 +32,7 @@ inline gp_Cone::gp_Cone (const gp_Ax3& A3, Standard_ConstructionError_Raise_if (radius < 0. || val <= gp::Resolution() || - M_PI * 0.5 - val <= gp::Resolution(), ""); + M_PI * 0.5 - val <= gp::Resolution(), "gp_Cone() - invalid construction parameters"); } inline void gp_Cone::SetAxis (const gp_Ax1& A1) @@ -46,8 +46,7 @@ inline void gp_Cone::SetPosition (const gp_Ax3& A3) inline void gp_Cone::SetRadius (const Standard_Real R) { - Standard_ConstructionError_Raise_if - (R < 0.0,""); + Standard_ConstructionError_Raise_if (R < 0.0, "gp_Cone::SetRadius() - radius should be positive number"); radius = R; } @@ -57,7 +56,7 @@ inline void gp_Cone::SetSemiAngle (const Standard_Real Ang) if (val < 0) val = - val; Standard_ConstructionError_Raise_if (val <= gp::Resolution() || - M_PI * 0.5 - val <= gp::Resolution(),""); + M_PI * 0.5 - val <= gp::Resolution(), "gp_Cone::SetSemiAngle() - invalid angle range"); semiAngle = Ang; } diff --git a/src/gp/gp_Cylinder.lxx b/src/gp/gp_Cylinder.lxx index 1a34ff6415..6201bbf362 100644 --- a/src/gp/gp_Cylinder.lxx +++ b/src/gp/gp_Cylinder.lxx @@ -21,7 +21,9 @@ inline gp_Cylinder::gp_Cylinder (const gp_Ax3& A3, const Standard_Real Radius) : pos(A3), radius (Radius) -{ Standard_ConstructionError_Raise_if (Radius < 0.0,""); } +{ + Standard_ConstructionError_Raise_if (Radius < 0.0, "gp_Cylinder() - radius should be positive number"); +} inline void gp_Cylinder::SetAxis (const gp_Ax1& A1) { pos.SetAxis (A1); } @@ -34,7 +36,7 @@ inline void gp_Cylinder::SetPosition (const gp_Ax3& A3) inline void gp_Cylinder::SetRadius (const Standard_Real R) { - Standard_ConstructionError_Raise_if (R < 0.0,""); + Standard_ConstructionError_Raise_if (R < 0.0, "gp_Cylinder::SetRadius() - radius should be positive number"); radius = R; } diff --git a/src/gp/gp_Dir.lxx b/src/gp/gp_Dir.lxx index c787e9dd31..98a5f8ad6b 100644 --- a/src/gp/gp_Dir.lxx +++ b/src/gp/gp_Dir.lxx @@ -28,7 +28,7 @@ inline gp_Dir::gp_Dir (const gp_Vec& V) Standard_Real Y = XYZ.Y(); Standard_Real Z = XYZ.Z(); Standard_Real D = sqrt(X * X + Y * Y + Z * Z); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir() - input vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); coord.SetZ(Z / D); @@ -40,7 +40,7 @@ inline gp_Dir::gp_Dir (const gp_XYZ& XYZ) Standard_Real Y = XYZ.Y(); Standard_Real Z = XYZ.Z(); Standard_Real D = sqrt(X * X + Y * Y + Z * Z); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir() - input vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); coord.SetZ(Z / D); @@ -51,7 +51,7 @@ inline gp_Dir::gp_Dir (const Standard_Real Xv, const Standard_Real Zv) { Standard_Real D = sqrt (Xv * Xv + Yv * Yv + Zv * Zv); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir() - input vector has zero norm"); coord.SetX(Xv / D); coord.SetY(Yv / D); coord.SetZ(Zv / D); @@ -63,12 +63,12 @@ inline void gp_Dir::SetCoord (const Standard_Integer Index, Standard_Real X = coord.X(); Standard_Real Y = coord.Y(); Standard_Real Z = coord.Z(); - Standard_OutOfRange_Raise_if (Index < 1 || Index > 3, " "); + Standard_OutOfRange_Raise_if (Index < 1 || Index > 3, "gp_Dir::SetCoord() - index is out of range [1, 3]"); if (Index == 1) X = Xi; else if (Index == 2) Y = Xi; else Z = Xi; Standard_Real D = sqrt (X * X + Y * Y + Z * Z); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::SetCoord() - result vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); coord.SetZ(Z / D); @@ -78,7 +78,7 @@ inline void gp_Dir::SetCoord (const Standard_Real Xv, const Standard_Real Yv, const Standard_Real Zv) { Standard_Real D = sqrt(Xv * Xv + Yv * Yv + Zv * Zv); - Standard_ConstructionError_Raise_if(D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if(D <= gp::Resolution(), "gp_Dir::SetCoord() - input vector has zero norm"); coord.SetX(Xv / D); coord.SetY(Yv / D); coord.SetZ(Zv / D); @@ -89,7 +89,7 @@ inline void gp_Dir::SetX (const Standard_Real X) Standard_Real Y = coord.Y(); Standard_Real Z = coord.Z(); Standard_Real D = sqrt (X * X + Y * Y + Z * Z); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::SetX() - result vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); coord.SetZ(Z / D); @@ -100,7 +100,7 @@ inline void gp_Dir::SetY (const Standard_Real Y) Standard_Real Z = coord.Z(); Standard_Real X = coord.X(); Standard_Real D = sqrt (X * X + Y * Y + Z * Z); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::SetY() - result vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); coord.SetZ(Z / D); @@ -111,7 +111,7 @@ inline void gp_Dir::SetZ (const Standard_Real Z) Standard_Real X = coord.X(); Standard_Real Y = coord.Y(); Standard_Real D = sqrt (X * X + Y * Y + Z * Z); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::SetZ() - result vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); coord.SetZ(Z / D); @@ -123,7 +123,7 @@ inline void gp_Dir::SetXYZ (const gp_XYZ& XYZ) Standard_Real Y = XYZ.Y(); Standard_Real Z = XYZ.Z(); Standard_Real D = sqrt(X * X + Y * Y + Z * Z); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::SetX() - input vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); coord.SetZ(Z / D); @@ -180,7 +180,7 @@ inline void gp_Dir::Cross (const gp_Dir& Right) { coord.Cross (Right.coord); Standard_Real D = coord.Modulus (); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::Cross() - result vector has zero norm"); coord.Divide (D); } @@ -189,7 +189,7 @@ inline gp_Dir gp_Dir::Crossed (const gp_Dir& Right) const gp_Dir V = *this; V.coord.Cross (Right.coord); Standard_Real D = V.coord.Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::Crossed() - result vector has zero norm"); V.coord.Divide (D); return V; } @@ -199,7 +199,7 @@ inline void gp_Dir::CrossCross (const gp_Dir& V1, { coord.CrossCross (V1.coord, V2.coord); Standard_Real D = coord.Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::CrossCross() - result vector has zero norm"); coord.Divide(D); } @@ -209,7 +209,7 @@ inline gp_Dir gp_Dir::CrossCrossed (const gp_Dir& V1, gp_Dir V = *this; (V.coord).CrossCross (V1.coord, V2.coord); Standard_Real D = V.coord.Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::CrossCrossed() - result vector has zero norm"); V.coord.Divide(D); return V; } diff --git a/src/gp/gp_Dir2d.lxx b/src/gp/gp_Dir2d.lxx index 59a3abf76c..a60eb599d4 100644 --- a/src/gp/gp_Dir2d.lxx +++ b/src/gp/gp_Dir2d.lxx @@ -30,7 +30,7 @@ inline gp_Dir2d::gp_Dir2d (const gp_Vec2d& V) Standard_Real X = XY.X(); Standard_Real Y = XY.Y(); Standard_Real D = sqrt(X * X + Y * Y); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d() - input vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); } @@ -40,7 +40,7 @@ inline gp_Dir2d::gp_Dir2d (const gp_XY& XY) Standard_Real X = XY.X(); Standard_Real Y = XY.Y(); Standard_Real D = sqrt(X * X + Y * Y); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d() - input vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); } @@ -49,7 +49,7 @@ inline gp_Dir2d::gp_Dir2d (const Standard_Real Xv, const Standard_Real Yv) { Standard_Real D = sqrt (Xv * Xv + Yv * Yv); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d() - input vector has zero norm"); coord.SetX(Xv / D); coord.SetY(Yv / D); } @@ -59,11 +59,11 @@ inline void gp_Dir2d::SetCoord (const Standard_Integer Index, { Standard_Real X = coord.X(); Standard_Real Y = coord.Y(); - Standard_OutOfRange_Raise_if (Index < 1 || Index > 2, " "); + Standard_OutOfRange_Raise_if (Index < 1 || Index > 2, "gp_Dir2d::SetCoord() - index is out of range [1, 2]"); if (Index == 1) X = Xi; else Y = Xi; Standard_Real D = sqrt (X * X + Y * Y); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d::SetCoord() - result vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); } @@ -72,7 +72,7 @@ inline void gp_Dir2d::SetCoord (const Standard_Real Xv, const Standard_Real Yv) { Standard_Real D = sqrt (Xv * Xv + Yv * Yv); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d::SetCoord() - result vector has zero norm"); coord.SetX(Xv / D); coord.SetY(Yv / D); } @@ -81,7 +81,7 @@ inline void gp_Dir2d::SetX (const Standard_Real X) { Standard_Real Y = coord.Y(); Standard_Real D = sqrt (X * X + Y * Y); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d::SetX() - result vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); } @@ -90,7 +90,7 @@ inline void gp_Dir2d::SetY (const Standard_Real Y) { Standard_Real X = coord.X(); Standard_Real D = sqrt (X * X + Y * Y); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d::SetY() - result vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); } @@ -100,7 +100,7 @@ inline void gp_Dir2d::SetXY (const gp_XY& XY) Standard_Real X = XY.X(); Standard_Real Y = XY.Y(); Standard_Real D = sqrt(X * X + Y * Y); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d::SetZ() - result vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); } diff --git a/src/gp/gp_Elips.lxx b/src/gp/gp_Elips.lxx index 5b21a9a508..543cb712ad 100644 --- a/src/gp/gp_Elips.lxx +++ b/src/gp/gp_Elips.lxx @@ -30,8 +30,8 @@ inline gp_Elips::gp_Elips (const gp_Ax2& A2, majorRadius (MajorRadius), minorRadius (MinorRadius) { - Standard_ConstructionError_Raise_if - (MinorRadius < 0.0 || MajorRadius < MinorRadius,""); + Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < MinorRadius, + "gp_Elips() - invalid construction parameters"); } inline Standard_Real gp_Elips::Area() const @@ -58,7 +58,7 @@ inline const gp_Ax1& gp_Elips::Axis () const inline gp_Ax1 gp_Elips::Directrix1() const { Standard_Real E = Eccentricity(); - Standard_ConstructionError_Raise_if (E <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "gp_Elips::Directrix1() - zero eccentricity"); gp_XYZ Orig = pos.XDirection().XYZ(); Orig.Multiply (majorRadius/E); Orig.Add (pos.Location().XYZ()); @@ -68,7 +68,7 @@ inline gp_Ax1 gp_Elips::Directrix1() const inline gp_Ax1 gp_Elips::Directrix2() const { Standard_Real E = Eccentricity(); - Standard_ConstructionError_Raise_if (E <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "gp_Elips::Directrix2() - zero eccentricity"); gp_XYZ Orig = pos.XDirection().XYZ(); Orig.Multiply (-majorRadius/E); Orig.Add (pos.Location().XYZ()); @@ -132,13 +132,15 @@ inline void gp_Elips::SetLocation (const gp_Pnt& P) inline void gp_Elips::SetMajorRadius (const Standard_Real R) { - Standard_ConstructionError_Raise_if(R < minorRadius,""); + Standard_ConstructionError_Raise_if (R < minorRadius, + "gp_Elips::SetMajorRadius() - major radius should be greater or equal to minor radius"); majorRadius = R; } inline void gp_Elips::SetMinorRadius (const Standard_Real R) { - Standard_ConstructionError_Raise_if(R < 0.0 || majorRadius < R,""); + Standard_ConstructionError_Raise_if (R < 0.0 || majorRadius < R, + "gp_Elips::SetMinorRadius() - minor radius should be a positive number lesser or equal to major radius"); minorRadius = R; } diff --git a/src/gp/gp_Elips2d.lxx b/src/gp/gp_Elips2d.lxx index 2fc6f8d739..fb689fc5eb 100644 --- a/src/gp/gp_Elips2d.lxx +++ b/src/gp/gp_Elips2d.lxx @@ -29,8 +29,8 @@ inline gp_Elips2d::gp_Elips2d (const gp_Ax2d& MajorAxis, minorRadius(MinorRadius) { pos = gp_Ax22d(MajorAxis,Sense); - Standard_ConstructionError_Raise_if - (MinorRadius < 0.0 || MajorRadius < MinorRadius,""); + Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < MinorRadius, + "gp_Elips2d() - invalid construction parameters"); } inline gp_Elips2d::gp_Elips2d (const gp_Ax22d& A, @@ -40,8 +40,8 @@ inline gp_Elips2d::gp_Elips2d (const gp_Ax22d& A, majorRadius(MajorRadius), minorRadius(MinorRadius) { - Standard_ConstructionError_Raise_if - (MinorRadius < 0.0 || MajorRadius < MinorRadius,""); + Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < MinorRadius, + "gp_Elips2d() - invalid construction parameters"); } inline void gp_Elips2d::SetLocation (const gp_Pnt2d& P) @@ -49,14 +49,15 @@ inline void gp_Elips2d::SetLocation (const gp_Pnt2d& P) inline void gp_Elips2d::SetMajorRadius (const Standard_Real MajorRadius) { - Standard_ConstructionError_Raise_if(MajorRadius < minorRadius,""); + Standard_ConstructionError_Raise_if (MajorRadius < minorRadius, + "gp_Elips2d::SetMajorRadius() - major radius should be greater or equal to minor radius"); majorRadius = MajorRadius; } inline void gp_Elips2d::SetMinorRadius (const Standard_Real MinorRadius) { - Standard_ConstructionError_Raise_if - (MinorRadius < 0.0 || majorRadius < MinorRadius,""); + Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || majorRadius < MinorRadius, + "gp_Elips2d::SetMinorRadius() - minor radius should be a positive number lesser or equal to major radius"); minorRadius = MinorRadius; } @@ -75,7 +76,7 @@ inline Standard_Real gp_Elips2d::Area() const inline gp_Ax2d gp_Elips2d::Directrix1() const { Standard_Real E = Eccentricity(); - Standard_ConstructionError_Raise_if (E <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "gp_Elips2d::Directrix1() - zero eccentricity"); gp_XY Orig = pos.XDirection().XY(); Orig.Multiply (majorRadius/E); Orig.Add (pos.Location().XY()); @@ -85,7 +86,7 @@ inline gp_Ax2d gp_Elips2d::Directrix1() const inline gp_Ax2d gp_Elips2d::Directrix2() const { Standard_Real E = Eccentricity(); - Standard_ConstructionError_Raise_if (E <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "gp_Elips2d::Directrix2() - zero eccentricity"); gp_XY Orig = pos.XDirection().XY(); Orig.Multiply (-majorRadius/E); Orig.Add (pos.Location().XY()); diff --git a/src/gp/gp_Hypr.lxx b/src/gp/gp_Hypr.lxx index fccc0ac587..43d5bfb337 100644 --- a/src/gp/gp_Hypr.lxx +++ b/src/gp/gp_Hypr.lxx @@ -28,8 +28,8 @@ inline gp_Hypr::gp_Hypr (const gp_Ax2& A2, majorRadius(MajorRadius), minorRadius(MinorRadius) { - Standard_ConstructionError_Raise_if - (MinorRadius < 0.0 || MajorRadius < 0.0,""); + Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < 0.0, + "gp_Hypr() - invalid construction parameters"); } inline void gp_Hypr::SetAxis (const gp_Ax1& A1) @@ -40,13 +40,15 @@ inline void gp_Hypr::SetLocation (const gp_Pnt& P) inline void gp_Hypr::SetMajorRadius (const Standard_Real R) { - Standard_ConstructionError_Raise_if(R < 0.0,""); + Standard_ConstructionError_Raise_if (R < 0.0, + "gp_Hypr::SetMajorRadius() - major radius should be greater or equal zero"); majorRadius = R; } inline void gp_Hypr::SetMinorRadius (const Standard_Real R) { - Standard_ConstructionError_Raise_if(R < 0.0,""); + Standard_ConstructionError_Raise_if (R < 0.0, + "gp_Hypr::SetMinorRadius() - minor radius should be greater or equal zero"); minorRadius = R; } @@ -55,8 +57,8 @@ inline void gp_Hypr::SetPosition (const gp_Ax2& A2) inline gp_Ax1 gp_Hypr::Asymptote1 () const { - Standard_ConstructionError_Raise_if - (majorRadius <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(), + "gp_Hypr::Asymptote1() - major radius is zero"); gp_Vec V1 = gp_Vec (pos.YDirection()); V1.Multiply (minorRadius / majorRadius); gp_Vec V = gp_Vec (pos.XDirection()); @@ -66,7 +68,8 @@ inline gp_Ax1 gp_Hypr::Asymptote1 () const inline gp_Ax1 gp_Hypr::Asymptote2 () const { - Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(), + "gp_Hypr::Asymptote1() - major radius is zero"); gp_Vec V1 = gp_Vec (pos.YDirection()); V1.Multiply (-minorRadius / majorRadius); gp_Vec V = gp_Vec (pos.XDirection()); @@ -113,7 +116,8 @@ inline gp_Ax1 gp_Hypr::Directrix2 () const inline Standard_Real gp_Hypr::Eccentricity () const { - Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), ""); + Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), + "gp_Hypr::Eccentricity() - major radius is zero"); return sqrt(majorRadius * majorRadius + minorRadius * minorRadius) / majorRadius; } @@ -165,7 +169,8 @@ inline gp_Hypr gp_Hypr::OtherBranch () const inline Standard_Real gp_Hypr::Parameter() const { - Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), ""); + Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), + "gp_Hypr::Parameter() - major radius is zero"); return (minorRadius * minorRadius) / majorRadius; } diff --git a/src/gp/gp_Hypr2d.lxx b/src/gp/gp_Hypr2d.lxx index 89db2741a2..cdc297d6d3 100644 --- a/src/gp/gp_Hypr2d.lxx +++ b/src/gp/gp_Hypr2d.lxx @@ -30,8 +30,8 @@ inline gp_Hypr2d::gp_Hypr2d (const gp_Ax22d& A, majorRadius(MajorRadius), minorRadius(MinorRadius) { - Standard_ConstructionError_Raise_if - (MinorRadius < 0.0 || MajorRadius < 0.0,""); + Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < 0.0, + "gp_Hypr2d() - invalid construction parameters"); } inline gp_Hypr2d::gp_Hypr2d (const gp_Ax2d& MajorAxis, @@ -42,8 +42,8 @@ inline gp_Hypr2d::gp_Hypr2d (const gp_Ax2d& MajorAxis, minorRadius(MinorRadius) { pos = gp_Ax22d(MajorAxis,Sense); - Standard_ConstructionError_Raise_if - (MinorRadius < 0.0 || MajorRadius < 0.0,""); + Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < 0.0, + "gp_Hypr2d() - invalid construction parameters"); } inline void gp_Hypr2d::SetLocation (const gp_Pnt2d& P) @@ -51,13 +51,15 @@ inline void gp_Hypr2d::SetLocation (const gp_Pnt2d& P) inline void gp_Hypr2d::SetMajorRadius (const Standard_Real MajorRadius) { - Standard_ConstructionError_Raise_if(MajorRadius < 0.0,""); + Standard_ConstructionError_Raise_if (MajorRadius < 0.0, + "gp_Hypr2d::SetMajorRadius() - major radius should be greater or equal zero"); majorRadius = MajorRadius; } inline void gp_Hypr2d::SetMinorRadius (const Standard_Real MinorRadius) { - Standard_ConstructionError_Raise_if(MinorRadius < 0.0,""); + Standard_ConstructionError_Raise_if (MinorRadius < 0.0, + "gp_Hypr2d::SetMinorRadius() - minor radius should be greater or equal zero"); minorRadius = MinorRadius; } @@ -72,7 +74,8 @@ inline void gp_Hypr2d::SetYAxis (const gp_Ax2d& A) inline gp_Ax2d gp_Hypr2d::Asymptote1() const { - Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(), + "gp_Hypr2d::Asymptote1() - major radius is zero"); gp_Dir2d Vdir = pos.XDirection(); gp_XY Coord1 (pos.YDirection().XY()); gp_XY Coord2 = Coord1.Multiplied (minorRadius / majorRadius); @@ -82,7 +85,8 @@ inline gp_Ax2d gp_Hypr2d::Asymptote1() const } inline gp_Ax2d gp_Hypr2d::Asymptote2() const { - Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(), + "gp_Hypr2d::Asymptote2() - major radius is zero"); gp_Vec2d Vdir = pos.XDirection(); gp_XY Coord1 (pos.YDirection().XY()); gp_XY Coord2 = Coord1.Multiplied (-minorRadius / majorRadius); @@ -125,7 +129,8 @@ inline gp_Ax2d gp_Hypr2d::Directrix2() const inline Standard_Real gp_Hypr2d::Eccentricity() const { - Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), ""); + Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), + "gp_Hypr2d::Eccentricity() - major radius is zero"); return sqrt(majorRadius * majorRadius + minorRadius * minorRadius) / majorRadius; } @@ -170,7 +175,8 @@ inline gp_Hypr2d gp_Hypr2d::OtherBranch() const inline Standard_Real gp_Hypr2d::Parameter() const { - Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), ""); + Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), + "gp_Hypr2d::Parameter() - major radius is zero"); return (minorRadius * minorRadius) / majorRadius; } diff --git a/src/gp/gp_Mat.cxx b/src/gp/gp_Mat.cxx index 244f652ab4..cb106686fc 100644 --- a/src/gp/gp_Mat.cxx +++ b/src/gp/gp_Mat.cxx @@ -165,7 +165,7 @@ void gp_Mat::SetRows (const gp_XYZ& Row1, gp_XYZ gp_Mat::Column (const Standard_Integer Col) const { - Standard_OutOfRange_Raise_if (Col < 1 || Col > 3, ""); + Standard_OutOfRange_Raise_if (Col < 1 || Col > 3, "gp_Mat::Column() - wrong index"); const Standard_Address M = (Standard_Address)&(matrix[0][0]); if (Col == 1) return gp_XYZ (M00,M10,M20); if (Col == 2) return gp_XYZ (M01,M11,M21); @@ -180,7 +180,7 @@ gp_XYZ gp_Mat::Diagonal () const gp_XYZ gp_Mat::Row (const Standard_Integer Row) const { - Standard_OutOfRange_Raise_if (Row < 1 || Row > 3, ""); + Standard_OutOfRange_Raise_if (Row < 1 || Row > 3, "gp_Mat::Row() - wrong index"); const Standard_Address M = (Standard_Address)&(matrix[0][0]); if (Row == 1) return gp_XYZ (M00,M01,M02); if (Row == 2) return gp_XYZ (M10,M11,M12); @@ -208,8 +208,7 @@ void gp_Mat::Invert () Standard_Real det = M00 * N00 + M01* N10 + M02 * N20 ; Standard_Real val = det; if (val < 0) val = - val; - Standard_ConstructionError_Raise_if - (val <= gp::Resolution(),""); + Standard_ConstructionError_Raise_if (val <= gp::Resolution(), "gp_Mat::Invert() - matrix has zero determinant"); det = 1.0e0 / det ; M00 = N00; M10 = N10; @@ -243,8 +242,7 @@ gp_Mat gp_Mat::Inverted () const Standard_Real det = M00 * N00 + M01* N10 + M02 * N20 ; Standard_Real val = det; if (val < 0) val = - val; - Standard_ConstructionError_Raise_if - (val <= gp::Resolution(),""); + Standard_ConstructionError_Raise_if (val <= gp::Resolution(), "gp_Mat::Inverted() - matrix has zero determinant"); det = 1.0e0 / det ; NewMat.Multiply(det) ; return NewMat; diff --git a/src/gp/gp_Mat2d.cxx b/src/gp/gp_Mat2d.cxx index c97a6f28b8..6aa7698c8e 100644 --- a/src/gp/gp_Mat2d.cxx +++ b/src/gp/gp_Mat2d.cxx @@ -47,7 +47,7 @@ gp_Mat2d::gp_Mat2d (const gp_XY& Col1, const gp_XY& Col2) void gp_Mat2d::SetCol (const Standard_Integer Col, const gp_XY& Value) { - Standard_OutOfRange_Raise_if (Col < 1 || Col > 2,""); + Standard_OutOfRange_Raise_if (Col < 1 || Col > 2, "gp_Mat2d::SetCol() - invalid index"); const Standard_Address M = (Standard_Address)&(matrix[0][0]); if (Col == 1) { M00 = Value.X(); @@ -69,7 +69,7 @@ void gp_Mat2d::SetCols (const gp_XY& Col1, void gp_Mat2d::SetRow (const Standard_Integer Row, const gp_XY& Value) { - Standard_OutOfRange_Raise_if (Row < 1 || Row > 2,""); + Standard_OutOfRange_Raise_if (Row < 1 || Row > 2, "gp_Mat2d::SetRow() - invalid index"); const Standard_Address M = (Standard_Address)&(matrix[0][0]); if (Row == 1) { M00 = Value.X(); @@ -90,7 +90,7 @@ void gp_Mat2d::SetRows (const gp_XY& Row1, const gp_XY& Row2) gp_XY gp_Mat2d::Column (const Standard_Integer Col) const { - Standard_OutOfRange_Raise_if (Col < 1 || Col > 2,""); + Standard_OutOfRange_Raise_if (Col < 1 || Col > 2, "gp_Mat2d::Column() - invalid index"); const Standard_Address M = (Standard_Address)&(matrix[0][0]); if (Col == 1) return gp_XY (M00,M10); return gp_XY (M01,M11); @@ -104,7 +104,7 @@ gp_XY gp_Mat2d::Diagonal () const gp_XY gp_Mat2d::Row (const Standard_Integer Row) const { - Standard_OutOfRange_Raise_if (Row < 1 || Row > 2,""); + Standard_OutOfRange_Raise_if (Row < 1 || Row > 2, "gp_Mat2d::Row() - invalid index"); const Standard_Address M = (Standard_Address)&(matrix[0][0]); if (Row == 1) return gp_XY (M00,M01); return gp_XY (M10,M11); @@ -123,7 +123,7 @@ void gp_Mat2d::Invert () det = N00 * N11 - N01 * N10 ; Standard_Real val = det; if (val < 0) val = - val; - Standard_ConstructionError_Raise_if (val <= gp::Resolution(),""); + Standard_ConstructionError_Raise_if (val <= gp::Resolution(), "gp_Mat2d::Invert() - matrix has zero determinant"); det = 1.0 / det ; M00 = N00 * det ; M10 = N10 * det ; diff --git a/src/gp/gp_Parab.lxx b/src/gp/gp_Parab.lxx index 7fa6d1bb7b..c944527f7f 100644 --- a/src/gp/gp_Parab.lxx +++ b/src/gp/gp_Parab.lxx @@ -23,7 +23,9 @@ inline gp_Parab::gp_Parab (const gp_Ax2& A2, const Standard_Real Focal) : pos(A2), focalLength (Focal) -{ Standard_ConstructionError_Raise_if(Focal < 0.0,""); } +{ + Standard_ConstructionError_Raise_if (Focal < 0.0, "gp_Parab() - focal length should be >= 0"); +} inline gp_Parab::gp_Parab (const gp_Ax1& D, const gp_Pnt& F) @@ -45,7 +47,7 @@ inline void gp_Parab::SetAxis (const gp_Ax1& A1) inline void gp_Parab::SetFocal (const Standard_Real Focal) { - Standard_ConstructionError_Raise_if(Focal < 0.0,""); + Standard_ConstructionError_Raise_if (Focal < 0.0, "gp_Parab::SetFocal() - focal length should be >= 0"); focalLength = Focal; } diff --git a/src/gp/gp_Parab2d.lxx b/src/gp/gp_Parab2d.lxx index ced9ace0bd..c1ba7253cd 100644 --- a/src/gp/gp_Parab2d.lxx +++ b/src/gp/gp_Parab2d.lxx @@ -21,7 +21,7 @@ inline gp_Parab2d::gp_Parab2d(const gp_Ax22d& theMirrorAxis, pos (theMirrorAxis), focalLength (theFocalLength) { - Standard_ConstructionError_Raise_if(theFocalLength < 0.0,""); + Standard_ConstructionError_Raise_if (theFocalLength < 0.0, "gp_Parab2d() - focal length should be >= 0"); } inline gp_Parab2d::gp_Parab2d(const gp_Ax2d& theMirrorAxis, @@ -30,12 +30,12 @@ inline gp_Parab2d::gp_Parab2d(const gp_Ax2d& theMirrorAxis, focalLength (theFocalLength) { pos = gp_Ax22d(theMirrorAxis,theSense); - Standard_ConstructionError_Raise_if(theFocalLength < 0.0,""); + Standard_ConstructionError_Raise_if (theFocalLength < 0.0, "gp_Parab2d() - focal length should be >= 0"); } inline void gp_Parab2d::SetFocal (const Standard_Real Focal) { - Standard_ConstructionError_Raise_if(Focal < 0.0,""); + Standard_ConstructionError_Raise_if (Focal < 0.0, "gp_Parab2d::SetFocal() - focal length should be >= 0"); focalLength = Focal; } diff --git a/src/gp/gp_Sphere.lxx b/src/gp/gp_Sphere.lxx index 4099e71f90..6caacc5d56 100644 --- a/src/gp/gp_Sphere.lxx +++ b/src/gp/gp_Sphere.lxx @@ -19,7 +19,9 @@ inline gp_Sphere::gp_Sphere (const gp_Ax3& A3, const Standard_Real Radius) : pos (A3), radius (Radius) -{ Standard_ConstructionError_Raise_if (Radius < 0.0,""); } +{ + Standard_ConstructionError_Raise_if (Radius < 0.0, "gp_Sphere() - radius should be >= 0"); +} inline void gp_Sphere::SetLocation (const gp_Pnt& Loc) { pos.SetLocation (Loc); } @@ -29,7 +31,7 @@ inline void gp_Sphere::SetPosition (const gp_Ax3& A3) inline void gp_Sphere::SetRadius (const Standard_Real R) { - Standard_ConstructionError_Raise_if (R < 0.0,""); + Standard_ConstructionError_Raise_if (R < 0.0, "gp_Sphere::SetRadius() - radius should be >= 0"); radius = R; } diff --git a/src/gp/gp_Torus.lxx b/src/gp/gp_Torus.lxx index e54f6ea1a0..08fdc04f44 100644 --- a/src/gp/gp_Torus.lxx +++ b/src/gp/gp_Torus.lxx @@ -24,8 +24,8 @@ inline gp_Torus::gp_Torus (const gp_Ax3& A3, majorRadius (MajorRadius), minorRadius (MinorRadius) { - Standard_ConstructionError_Raise_if - (MinorRadius < 0.0 || MajorRadius < 0.0,""); + Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < 0.0, + "gp_Torus() - invalid construction parameters"); } inline void gp_Torus::SetAxis (const gp_Ax1& A1) @@ -36,15 +36,15 @@ inline void gp_Torus::SetLocation (const gp_Pnt& Loc) inline void gp_Torus::SetMajorRadius (const Standard_Real MajorRadius) { - Standard_ConstructionError_Raise_if - (MajorRadius - minorRadius <= gp::Resolution(),""); + Standard_ConstructionError_Raise_if (MajorRadius - minorRadius <= gp::Resolution(), + "gp_Torus::SetMajorRadius() - invalid input parameters"); majorRadius = MajorRadius; } inline void gp_Torus::SetMinorRadius (const Standard_Real MinorRadius) { - Standard_ConstructionError_Raise_if - (MinorRadius < 0.0 || majorRadius - MinorRadius <= gp::Resolution(),""); + Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || majorRadius - MinorRadius <= gp::Resolution(), + "gp_Torus::SetMinorRadius() - invalid input parameters"); minorRadius = MinorRadius; } diff --git a/src/gp/gp_Trsf.cxx b/src/gp/gp_Trsf.cxx index 56908a19eb..1b116fda56 100644 --- a/src/gp/gp_Trsf.cxx +++ b/src/gp/gp_Trsf.cxx @@ -405,16 +405,14 @@ void gp_Trsf::Invert() else if (shape == gp_Scale) { Standard_Real As = scale; if (As < 0) As = - As; - Standard_ConstructionError_Raise_if - (As <= gp::Resolution(),""); + Standard_ConstructionError_Raise_if (As <= gp::Resolution(), "gp_Trsf::Invert() - transformation has zero scale"); scale = 1.0 / scale; loc.Multiply (-scale); } else { Standard_Real As = scale; if (As < 0) As = - As; - Standard_ConstructionError_Raise_if - (As <= gp::Resolution(),""); + Standard_ConstructionError_Raise_if (As <= gp::Resolution(), "gp_Trsf::Invert() - transformation has zero scale"); scale = 1.0 / scale; matrix.Transpose (); loc.Multiply (matrix); diff --git a/src/gp/gp_Trsf2d.cxx b/src/gp/gp_Trsf2d.cxx index e3b6a4224a..2b712cbd43 100644 --- a/src/gp/gp_Trsf2d.cxx +++ b/src/gp/gp_Trsf2d.cxx @@ -173,14 +173,14 @@ void gp_Trsf2d::Invert() else if ( shape == gp_Scale) { Standard_Real As = scale; if (As < 0) As = - As; - Standard_ConstructionError_Raise_if(As <= gp::Resolution(),""); + Standard_ConstructionError_Raise_if (As <= gp::Resolution(), "gp_Trsf2d::Invert() - transformation has zero scale"); scale = 1.0 / scale; loc.Multiply (-scale); } else { Standard_Real As = scale; if (As < 0) As = - As; - Standard_ConstructionError_Raise_if(As <= gp::Resolution(),""); + Standard_ConstructionError_Raise_if (As <= gp::Resolution(), "gp_Trsf2d::Invert() - transformation has zero scale"); scale = 1.0 / scale; matrix.Transpose(); loc.Multiply (matrix); diff --git a/src/gp/gp_Vec.lxx b/src/gp/gp_Vec.lxx index 3a7e4e15e4..40283e9469 100644 --- a/src/gp/gp_Vec.lxx +++ b/src/gp/gp_Vec.lxx @@ -223,14 +223,16 @@ inline Standard_Real gp_Vec::DotCross (const gp_Vec& V1, inline void gp_Vec::Normalize() { Standard_Real D = coord.Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "gp_Vec::Normalize() - vector has zero norm"); coord.Divide (D); } inline gp_Vec gp_Vec::Normalized() const { Standard_Real D = coord.Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "gp_Vec::Normalized() - vector has zero norm"); gp_Vec V = *this; V.coord.Divide (D); return V; diff --git a/src/gp/gp_Vec2d.lxx b/src/gp/gp_Vec2d.lxx index e388835cd4..7f0c94bbba 100644 --- a/src/gp/gp_Vec2d.lxx +++ b/src/gp/gp_Vec2d.lxx @@ -147,14 +147,16 @@ inline gp_Vec2d gp_Vec2d::Multiplied (const Standard_Real Scalar) const inline void gp_Vec2d::Normalize() { Standard_Real D = coord.Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "gp_Vec2d::Normalize() - vector has zero norm"); coord.Divide (D); } inline gp_Vec2d gp_Vec2d::Normalized() const { Standard_Real D = coord.Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "gp_Vec2d::Normalized() - vector has zero norm"); gp_Vec2d V = *this; V.coord.Divide (D); return V; diff --git a/src/gp/gp_XY.lxx b/src/gp/gp_XY.lxx index 460bbb638c..ecd0605719 100644 --- a/src/gp/gp_XY.lxx +++ b/src/gp/gp_XY.lxx @@ -151,14 +151,16 @@ inline gp_XY gp_XY::Multiplied (const gp_Mat2d& Matrix) const inline void gp_XY::Normalize () { Standard_Real D = Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "gp_XY::Normalize() - vector has zero norm"); x = x / D; y = y / D; } inline gp_XY gp_XY::Normalized () const { Standard_Real D = Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "gp_XY::Normalized() - vector has zero norm"); return gp_XY (x / D, y / D); } diff --git a/src/gp/gp_XYZ.lxx b/src/gp/gp_XYZ.lxx index 9a9ed2a754..f97590738c 100644 --- a/src/gp/gp_XYZ.lxx +++ b/src/gp/gp_XYZ.lxx @@ -210,14 +210,16 @@ inline gp_XYZ gp_XYZ::Multiplied (const gp_Mat& Matrix) const inline void gp_XYZ::Normalize () { Standard_Real D = Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "gp_XYZ::Normalize() - vector has zero norm"); x = x / D; y = y / D; z = z / D; } inline gp_XYZ gp_XYZ::Normalized () const { Standard_Real D = Modulus(); - Standard_ConstructionError_Raise_if (D <= gp::Resolution(), ""); + Standard_ConstructionError_Raise_if (D <= gp::Resolution(), + "gp_XYZ::Normalized() - vector has zero norm"); return gp_XYZ (x / D, y / D, z / D); } diff --git a/src/math/math_Matrix.cxx b/src/math/math_Matrix.cxx index f8cca0534b..fc9383afa0 100644 --- a/src/math/math_Matrix.cxx +++ b/src/math/math_Matrix.cxx @@ -50,9 +50,8 @@ math_Matrix::math_Matrix (const Standard_Integer LowerRow, Array(LowerRow, UpperRow, LowerCol, UpperCol) { - - Standard_RangeError_Raise_if((LowerRow > UpperRow) || - (LowerCol > UpperCol), ""); + Standard_RangeError_Raise_if ((LowerRow > UpperRow) + || (LowerCol > UpperCol), "math_Matrix() - invalid dimensions"); } math_Matrix::math_Matrix (const Standard_Integer LowerRow, @@ -68,9 +67,8 @@ math_Matrix::math_Matrix (const Standard_Integer LowerRow, Array(LowerRow, UpperRow, LowerCol, UpperCol) { - - Standard_RangeError_Raise_if((LowerRow > UpperRow) || - (LowerCol > UpperCol), ""); + Standard_RangeError_Raise_if ((LowerRow > UpperRow) + || (LowerCol > UpperCol), "math_Matrix() - invalid dimensions"); Array.Init(InitialValue); } @@ -86,9 +84,8 @@ math_Matrix::math_Matrix (const Standard_Address Tab, UpperColIndex(UpperCol), Array(Tab, LowerRow, UpperRow, LowerCol, UpperCol) { - - Standard_RangeError_Raise_if((LowerRow > UpperRow) || - (LowerCol > UpperCol), ""); + Standard_RangeError_Raise_if ((LowerRow > UpperRow) + || (LowerCol > UpperCol), "math_Matrix() - invalid dimensions"); } void math_Matrix::Init(const Standard_Real InitialValue) @@ -110,7 +107,8 @@ Array(Other.Array) math_Matrix math_Matrix::Divided (const Standard_Real Right) const { - Standard_DivideByZero_Raise_if(Abs(Right) <= RealEpsilon(), ""); + Standard_DivideByZero_Raise_if (Abs(Right) <= RealEpsilon(), + "math_Matrix::Divided() - zero divisor"); math_Matrix temp = Multiplied(1./Right); return temp; } @@ -130,7 +128,8 @@ Standard_Real math_Matrix::Determinant() const void math_Matrix::Transpose() { - math_NotSquare_Raise_if(RowNumber() != ColNumber(), ""); + math_NotSquare_Raise_if (RowNumber() != ColNumber(), + "math_Matrix::Transpose() - matrix is not square"); Standard_Integer Row = LowerRowIndex; Standard_Integer Col = LowerColIndex; @@ -162,8 +161,9 @@ math_Matrix math_Matrix::Transposed() const void math_Matrix::Invert() { - math_NotSquare_Raise_if(RowNumber() != ColNumber(), ""); - + math_NotSquare_Raise_if (RowNumber() != ColNumber(), + "math_Matrix::Transpose() - matrix is not square"); + math_Gauss Sol(*this); if(Sol.IsDone()) { Sol.Invert(*this); @@ -218,7 +218,8 @@ math_Matrix math_Matrix::TMultiplied (const Standard_Real Right) const void math_Matrix::Divide (const Standard_Real Right) { - Standard_DivideByZero_Raise_if(Abs(Right) <= RealEpsilon(), ""); + Standard_DivideByZero_Raise_if (Abs(Right) <= RealEpsilon(), + "math_Matrix::Divide() - zero divisor"); for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) { for(Standard_Integer J = LowerColIndex; J <= UpperColIndex; J++) { @@ -229,10 +230,10 @@ void math_Matrix::Divide (const Standard_Real Right) void math_Matrix::Add (const math_Matrix& Right) { - Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) || - (ColNumber() != Right.ColNumber()), - ""); - + Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber()) + || (ColNumber() != Right.ColNumber()), + "math_Matrix::Add() - input matrix has different dimensions"); + Standard_Integer I2 = Right.LowerRowIndex; for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) { Standard_Integer J2 = Right.LowerColIndex; @@ -246,9 +247,9 @@ void math_Matrix::Add (const math_Matrix& Right) void math_Matrix::Subtract (const math_Matrix& Right) { - Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) || - (ColNumber() != Right.ColNumber()), - ""); + Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber()) + || (ColNumber() != Right.ColNumber()), + "math_Matrix::Subtract() - input matrix has different dimensions"); Standard_Integer I2 = Right.LowerRowIndex; for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) { @@ -272,7 +273,8 @@ void math_Matrix::Set(const Standard_Integer I1,const Standard_Integer I2, (J2 > UpperColIndex) || (I1 > I2) || (J1 > J2) || (I2-I1+1 != M.RowNumber()) || - (J2-J1+1 != M.ColNumber()), ""); + (J2-J1+1 != M.ColNumber()), + "math_Matrix::Set() - invalid indices"); Standard_Integer II = M.LowerRow(); for(Standard_Integer I = I1; I <= I2; I++) { @@ -288,11 +290,12 @@ void math_Matrix::Set(const Standard_Integer I1,const Standard_Integer I2, void math_Matrix::SetRow (const Standard_Integer Row, const math_Vector& V) { - - Standard_RangeError_Raise_if((Row < LowerRowIndex) || - (Row > UpperRowIndex) , ""); - - Standard_DimensionError_Raise_if(ColNumber() != V.Length(), ""); + Standard_RangeError_Raise_if ((Row < LowerRowIndex) + || (Row > UpperRowIndex), + "math_Matrix::SetRow() - invalid index"); + + Standard_DimensionError_Raise_if (ColNumber() != V.Length(), + "math_Matrix::SetRow() - input vector has wrong dimensions"); Standard_Integer I = V.LowerIndex; for(Standard_Integer Index = LowerColIndex; Index <= UpperColIndex; Index++) { @@ -304,11 +307,12 @@ void math_Matrix::SetRow (const Standard_Integer Row, void math_Matrix::SetCol (const Standard_Integer Col, const math_Vector& V) { + Standard_RangeError_Raise_if ((Col < LowerColIndex) + || (Col > UpperColIndex), + "math_Matrix::SetCol() - invalid index"); - Standard_RangeError_Raise_if((Col < LowerColIndex) || - (Col > UpperColIndex) , ""); - - Standard_DimensionError_Raise_if(RowNumber() != V.Length(), ""); + Standard_DimensionError_Raise_if (RowNumber() != V.Length(), + "math_Matrix::SetCol() - input vector has wrong dimensions"); Standard_Integer I = V.LowerIndex; for(Standard_Integer Index = LowerRowIndex; Index <= UpperRowIndex; Index++) { @@ -319,9 +323,9 @@ void math_Matrix::SetCol (const Standard_Integer Col, void math_Matrix::SetDiag(const Standard_Real Value) { - - math_NotSquare_Raise_if(RowNumber() != ColNumber(), ""); - + math_NotSquare_Raise_if (RowNumber() != ColNumber(), + "math_Matrix::SetDiag() - matrix is not square"); + for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) { Array(I, I) = Value; } @@ -351,12 +355,12 @@ math_Vector math_Matrix::Col (const Standard_Integer Col) const void math_Matrix::SwapRow(const Standard_Integer Row1, const Standard_Integer Row2) { - - Standard_RangeError_Raise_if((Row1 < LowerRowIndex) || - (Row1 > UpperRowIndex) || - (Row2 < LowerRowIndex) || - (Row2 > UpperRowIndex), ""); - + Standard_RangeError_Raise_if ((Row1 < LowerRowIndex) + || (Row1 > UpperRowIndex) + || (Row2 < LowerRowIndex) + || (Row2 > UpperRowIndex), + "math_Matrix::SetCol() - invalid indices"); + math_Vector V1 = Row(Row1); math_Vector V2 = Row(Row2); SetRow(Row1,V2); @@ -366,11 +370,11 @@ void math_Matrix::SwapRow(const Standard_Integer Row1, void math_Matrix::SwapCol(const Standard_Integer Col1, const Standard_Integer Col2) { - - Standard_RangeError_Raise_if((Col1 < LowerColIndex) || - (Col1 > UpperColIndex) || - (Col2 < LowerColIndex) || - (Col2 > UpperColIndex), ""); + Standard_RangeError_Raise_if ((Col1 < LowerColIndex) + || (Col1 > UpperColIndex) + || (Col2 < LowerColIndex) + || (Col2 > UpperColIndex), + "math_Matrix::SetCol() - invalid indices"); math_Vector V1 = Col(Col1); math_Vector V2 = Col(Col2); @@ -382,9 +386,9 @@ void math_Matrix::SwapCol(const Standard_Integer Col1, math_Matrix math_Matrix::Multiplied (const math_Matrix& Right) const { - - Standard_DimensionError_Raise_if(ColNumber() != Right.RowNumber(), ""); - + Standard_DimensionError_Raise_if (ColNumber() != Right.RowNumber(), + "math_Matrix::Multiplied() - matrices have incompatible dimensions"); + math_Matrix Result(LowerRowIndex, UpperRowIndex, Right.LowerColIndex, Right.UpperColIndex); @@ -405,9 +409,9 @@ math_Matrix math_Matrix::Multiplied (const math_Matrix& Right) const math_Matrix math_Matrix::TMultiply (const math_Matrix& Right) const { - - Standard_DimensionError_Raise_if(RowNumber() != Right.RowNumber(), ""); - + Standard_DimensionError_Raise_if (RowNumber() != Right.RowNumber(), + "math_Matrix::TMultiply() - matrices have incompatible dimensions"); + math_Matrix Result(LowerColIndex, UpperColIndex, Right.LowerColIndex, Right.UpperColIndex); @@ -428,10 +432,9 @@ math_Matrix math_Matrix::TMultiply (const math_Matrix& Right) const math_Matrix math_Matrix::Added (const math_Matrix& Right) const { - - Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) || - (ColNumber() != Right.ColNumber()), - ""); + Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber()) + || (ColNumber() != Right.ColNumber()), + "math_Matrix::Added() - input matrix has different dimensions"); math_Matrix Result(LowerRowIndex, UpperRowIndex, LowerColIndex, UpperColIndex); @@ -464,10 +467,9 @@ math_Matrix math_Matrix::Opposite () math_Matrix math_Matrix::Subtracted (const math_Matrix& Right) const { - - Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) || - (ColNumber() != Right.ColNumber()), - ""); + Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber()) + || (ColNumber() != Right.ColNumber()), + "math_Matrix::Subtracted() - input matrix has different dimensions"); math_Matrix Result(LowerRowIndex, UpperRowIndex, LowerColIndex, UpperColIndex); @@ -487,10 +489,9 @@ math_Matrix math_Matrix::Subtracted (const math_Matrix& Right) const void math_Matrix::Multiply(const math_Vector& Left, const math_Vector& Right) { - - Standard_DimensionError_Raise_if((RowNumber() != Left.Length()) || - (ColNumber() != Right.Length()), - ""); + Standard_DimensionError_Raise_if ((RowNumber() != Left.Length()) + || (ColNumber() != Right.Length()), + "math_Matrix::Multiply() - input vectors have incompatible dimensions"); for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) { for(Standard_Integer J = LowerColIndex; J <= UpperColIndex; J++) { @@ -502,12 +503,11 @@ void math_Matrix::Multiply(const math_Vector& Left, void math_Matrix::Multiply(const math_Matrix& Left, const math_Matrix& Right) { - - Standard_DimensionError_Raise_if((Left.ColNumber() != Right.RowNumber()) || - (RowNumber() != Left.RowNumber()) || - (ColNumber() != Right.ColNumber()), - ""); - + Standard_DimensionError_Raise_if ((Left.ColNumber() != Right.RowNumber()) + || (RowNumber() != Left.RowNumber()) + || (ColNumber() != Right.ColNumber()), + "math_Matrix::Multiply() - matrices have incompatible dimensions"); + Standard_Real Som; Standard_Integer I1 = Left.LowerRowIndex; for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) { @@ -531,11 +531,10 @@ void math_Matrix::Multiply(const math_Matrix& Left, void math_Matrix::TMultiply(const math_Matrix& TLeft, const math_Matrix& Right) { - - Standard_DimensionError_Raise_if((TLeft.RowNumber() != Right.RowNumber()) || - (RowNumber() != TLeft.ColNumber()) || - (ColNumber() != Right.ColNumber()), - ""); + Standard_DimensionError_Raise_if ((TLeft.RowNumber() != Right.RowNumber()) + || (RowNumber() != TLeft.ColNumber()) + || (ColNumber() != Right.ColNumber()), + "math_Matrix::TMultiply() - matrices have incompatible dimensions"); Standard_Real Som; Standard_Integer I1 = TLeft.LowerColIndex; @@ -560,13 +559,12 @@ void math_Matrix::TMultiply(const math_Matrix& TLeft, void math_Matrix::Add (const math_Matrix& Left, const math_Matrix& Right) { - - Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) || - (ColNumber() != Right.ColNumber()) || - (Right.RowNumber() != Left.RowNumber()) || - (Right.ColNumber() != Left.ColNumber()), - ""); - + Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber()) + || (ColNumber() != Right.ColNumber()) + || (Right.RowNumber() != Left.RowNumber()) + || (Right.ColNumber() != Left.ColNumber()), + "math_Matrix::Add() - matrices have incompatible dimensions"); + Standard_Integer I1 = Left.LowerRowIndex; Standard_Integer I2 = Right.LowerRowIndex; for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) { @@ -585,13 +583,12 @@ void math_Matrix::Add (const math_Matrix& Left, void math_Matrix::Subtract(const math_Matrix& Left, const math_Matrix& Right) { - - Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) || - (ColNumber() != Right.ColNumber()) || - (Right.RowNumber() != Left.RowNumber()) || - (Right.ColNumber() != Left.ColNumber()), - ""); - + Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber()) + || (ColNumber() != Right.ColNumber()) + || (Right.RowNumber() != Left.RowNumber()) + || (Right.ColNumber() != Left.ColNumber()), + "math_Matrix::Subtract() - matrices have incompatible dimensions"); + Standard_Integer I1 = Left.LowerRowIndex; Standard_Integer I2 = Right.LowerRowIndex; for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) { @@ -610,8 +607,8 @@ void math_Matrix::Subtract(const math_Matrix& Left, void math_Matrix::Multiply(const math_Matrix& Right) { - - Standard_DimensionError_Raise_if(ColNumber() != Right.RowNumber(), ""); + Standard_DimensionError_Raise_if (ColNumber() != Right.RowNumber(), + "math_Matrix::Multiply() - input matrix has incompatible dimensions"); Standard_Real Som; for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) { @@ -631,8 +628,8 @@ void math_Matrix::Multiply(const math_Matrix& Right) math_Vector math_Matrix::Multiplied(const math_Vector& Right)const { - - Standard_DimensionError_Raise_if(ColNumber() != Right.Length(), ""); + Standard_DimensionError_Raise_if (ColNumber() != Right.Length(), + "math_Matrix::Multiplied() - input vector has incompatible dimensions"); math_Vector Result(LowerRowIndex, UpperRowIndex); @@ -649,9 +646,9 @@ math_Vector math_Matrix::Multiplied(const math_Vector& Right)const math_Matrix& math_Matrix::Initialized(const math_Matrix& Other) { - - Standard_DimensionError_Raise_if((RowNumber() != Other.RowNumber()) || - (ColNumber() != Other.ColNumber()), ""); + Standard_DimensionError_Raise_if ((RowNumber() != Other.RowNumber()) + || (ColNumber() != Other.ColNumber()), + "math_Matrix::Initialized() - input matrix has different dimensions"); (Other.Array).Copy(Array); return *this; diff --git a/src/math/math_Vector.cxx b/src/math/math_Vector.cxx index 6334d8139f..f942a3e4a4 100644 --- a/src/math/math_Vector.cxx +++ b/src/math/math_Vector.cxx @@ -27,7 +27,7 @@ math_Vector::math_Vector(const Standard_Integer theLower, const Standard_Integer UpperIndex(theUpper), Array(theLower,theUpper) { - Standard_RangeError_Raise_if(theLower > theUpper, ""); + Standard_RangeError_Raise_if (theLower > theUpper, "math_Vector() - invalid dimensions"); } math_Vector::math_Vector(const Standard_Integer theLower, @@ -37,7 +37,7 @@ math_Vector::math_Vector(const Standard_Integer theLower, UpperIndex(theUpper), Array(theLower,theUpper) { - Standard_RangeError_Raise_if(theLower > theUpper, ""); + Standard_RangeError_Raise_if (theLower > theUpper, "math_Vector() - invalid dimensions"); Array.Init(theInitialValue); } @@ -48,7 +48,7 @@ math_Vector::math_Vector(const Standard_Address theTab, UpperIndex(theUpper), Array(theTab, theLower,theUpper) { - Standard_RangeError_Raise_if((theLower > theUpper) , ""); + Standard_RangeError_Raise_if ((theLower > theUpper), "math_Vector() - invalid dimensions"); } math_Vector::math_Vector(const gp_XY& theOther): @@ -147,8 +147,9 @@ void math_Vector::Set(const Standard_Integer theI1, const Standard_Integer theI2, const math_Vector &theV) { - Standard_RangeError_Raise_if((theI1 < LowerIndex) || (theI2 > UpperIndex) || - (theI1 > theI2) || (theI2 - theI1 + 1 != theV.Length()), ""); + Standard_RangeError_Raise_if ((theI1 < LowerIndex) || (theI2 > UpperIndex) + || (theI1 > theI2) || (theI2 - theI1 + 1 != theV.Length()), + "math_Vector::Set() - invalid indices"); Standard_Integer I = theV.Lower(); for(Standard_Integer Index = theI1; Index <= theI2; Index++) @@ -161,7 +162,8 @@ void math_Vector::Set(const Standard_Integer theI1, void math_Vector::Normalize() { Standard_Real Result = Norm(); - Standard_NullValue_Raise_if((Result <= RealEpsilon()), ""); + Standard_NullValue_Raise_if ((Result <= RealEpsilon()), + "math_Vector::Normalize() - vector has zero norm"); for(Standard_Integer Index = LowerIndex; Index <= UpperIndex; Index++) { Array(Index) = Array(Index) / Result; @@ -228,7 +230,8 @@ void math_Vector::Multiply(const Standard_Real theRight) void math_Vector::Divide(const Standard_Real theRight) { - Standard_DivideByZero_Raise_if(Abs(theRight) <= RealEpsilon(), ""); + Standard_DivideByZero_Raise_if (Abs(theRight) <= RealEpsilon(), + "math_Vector::Divide() - devisor is zero"); for(Standard_Integer Index =LowerIndex; Index <=UpperIndex; Index++) { @@ -238,14 +241,16 @@ void math_Vector::Divide(const Standard_Real theRight) math_Vector math_Vector::Divided (const Standard_Real theRight) const { - Standard_DivideByZero_Raise_if(Abs(theRight) <= RealEpsilon(), ""); + Standard_DivideByZero_Raise_if (Abs(theRight) <= RealEpsilon(), + "math_Vector::Divided() - devisor is zero"); math_Vector temp = Multiplied(1./theRight); return temp; } void math_Vector::Add(const math_Vector& theRight) { - Standard_DimensionError_Raise_if(Length() != theRight.Length(), ""); + Standard_DimensionError_Raise_if (Length() != theRight.Length(), + "math_Vector::Add() - input vector has wrong dimensions"); Standard_Integer I = theRight.LowerIndex; for(Standard_Integer Index = LowerIndex; Index <= UpperIndex; Index++) @@ -257,7 +262,8 @@ void math_Vector::Add(const math_Vector& theRight) math_Vector math_Vector::Added(const math_Vector& theRight) const { - Standard_DimensionError_Raise_if(Length() != theRight.Length(), ""); + Standard_DimensionError_Raise_if (Length() != theRight.Length(), + "math_Vector::Added() - input vector has wrong dimensions"); math_Vector Result(LowerIndex, UpperIndex); @@ -272,7 +278,8 @@ math_Vector math_Vector::Added(const math_Vector& theRight) const void math_Vector::Subtract(const math_Vector& theRight) { - Standard_DimensionError_Raise_if(Length() != theRight.Length(), ""); + Standard_DimensionError_Raise_if (Length() != theRight.Length(), + "math_Vector::Subtract() - input vector has wrong dimensions"); Standard_Integer I = theRight.LowerIndex; for(Standard_Integer Index = LowerIndex; Index <= UpperIndex; Index++) @@ -284,7 +291,8 @@ void math_Vector::Subtract(const math_Vector& theRight) math_Vector math_Vector::Subtracted (const math_Vector& theRight) const { - Standard_DimensionError_Raise_if(Length() != theRight.Length(), ""); + Standard_DimensionError_Raise_if (Length() != theRight.Length(), + "math_Vector::Subtracted() - input vector has wrong dimensions"); math_Vector Result(LowerIndex, UpperIndex); @@ -299,7 +307,8 @@ math_Vector math_Vector::Subtracted (const math_Vector& theRight) const math_Vector math_Vector::Slice(const Standard_Integer theI1, const Standard_Integer theI2) const { - Standard_RangeError_Raise_if((theI1 < LowerIndex) || (theI1 > UpperIndex) || (theI2 < LowerIndex) || (theI2 > UpperIndex) , ""); + Standard_RangeError_Raise_if ((theI1 < LowerIndex) || (theI1 > UpperIndex) || (theI2 < LowerIndex) || (theI2 > UpperIndex), + "math_Vector::Slice() - invalid indices"); if(theI2 >= theI1) { @@ -323,7 +332,8 @@ math_Vector math_Vector::Slice(const Standard_Integer theI1, const Standard_Inte void math_Vector::Add (const math_Vector& theLeft, const math_Vector& theRight) { - Standard_DimensionError_Raise_if((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()), ""); + Standard_DimensionError_Raise_if ((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()), + "math_Vector::Add() - input vectors have wrong dimensions"); Standard_Integer I = theLeft.LowerIndex; Standard_Integer J = theRight.LowerIndex; @@ -337,7 +347,8 @@ void math_Vector::Add (const math_Vector& theLeft, const math_Vector& theRight) void math_Vector::Subtract (const math_Vector& theLeft, const math_Vector& theRight) { - Standard_DimensionError_Raise_if((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()), ""); + Standard_DimensionError_Raise_if ((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()), + "math_Vector::Subtract() - input vectors have wrong dimensions"); Standard_Integer I = theLeft.LowerIndex; Standard_Integer J = theRight.LowerIndex; @@ -351,8 +362,9 @@ void math_Vector::Subtract (const math_Vector& theLeft, const math_Vector& theRi void math_Vector::Multiply(const math_Matrix& theLeft, const math_Vector& theRight) { - Standard_DimensionError_Raise_if((Length() != theLeft.RowNumber()) || - (theLeft.ColNumber() != theRight.Length()), ""); + Standard_DimensionError_Raise_if ((Length() != theLeft.RowNumber()) + || (theLeft.ColNumber() != theRight.Length()), + "math_Vector::Multiply() - input matrix and/or vector have wrong dimensions"); Standard_Integer Index = LowerIndex; for(Standard_Integer I = theLeft.LowerRowIndex; I <= theLeft.UpperRowIndex; I++) @@ -370,8 +382,9 @@ void math_Vector::Multiply(const math_Matrix& theLeft, const math_Vector& theRig void math_Vector::Multiply(const math_Vector& theLeft, const math_Matrix& theRight) { - Standard_DimensionError_Raise_if((Length() != theRight.ColNumber()) || - (theLeft.Length() != theRight.RowNumber()), ""); + Standard_DimensionError_Raise_if ((Length() != theRight.ColNumber()) + || (theLeft.Length() != theRight.RowNumber()), + "math_Vector::Multiply() - input matrix and/or vector have wrong dimensions"); Standard_Integer Index = LowerIndex; for(Standard_Integer J = theRight.LowerColIndex; J <= theRight.UpperColIndex; J++) @@ -389,8 +402,9 @@ void math_Vector::Multiply(const math_Vector& theLeft, const math_Matrix& theRig void math_Vector::TMultiply(const math_Matrix& theTLeft, const math_Vector& theRight) { - Standard_DimensionError_Raise_if((Length() != theTLeft.ColNumber()) || - (theTLeft.RowNumber() != theRight.Length()), ""); + Standard_DimensionError_Raise_if ((Length() != theTLeft.ColNumber()) + || (theTLeft.RowNumber() != theRight.Length()), + "math_Vector::TMultiply() - input matrix and/or vector have wrong dimensions"); Standard_Integer Index = LowerIndex; for(Standard_Integer I = theTLeft.LowerColIndex; I <= theTLeft.UpperColIndex; I++) @@ -408,8 +422,9 @@ void math_Vector::TMultiply(const math_Matrix& theTLeft, const math_Vector& the void math_Vector::TMultiply(const math_Vector& theLeft, const math_Matrix& theTRight) { - Standard_DimensionError_Raise_if((Length() != theTRight.RowNumber()) || - (theLeft.Length() != theTRight.ColNumber()), ""); + Standard_DimensionError_Raise_if ((Length() != theTRight.RowNumber()) + || (theLeft.Length() != theTRight.ColNumber()), + "math_Vector::TMultiply() - input matrix and/or vector have wrong dimensions"); Standard_Integer Index = LowerIndex; for(Standard_Integer J = theTRight.LowerRowIndex; J <= theTRight.UpperRowIndex; J++) @@ -430,7 +445,8 @@ Standard_Real math_Vector::Multiplied(const math_Vector& theRight) const { Standard_Real Result = 0; - Standard_DimensionError_Raise_if(Length() != theRight.Length(), ""); + Standard_DimensionError_Raise_if (Length() != theRight.Length(), + "math_Vector::Multiplied() - input vector has wrong dimensions"); Standard_Integer I = theRight.LowerIndex; for(Standard_Integer Index = LowerIndex; Index <= UpperIndex; Index++) @@ -454,7 +470,8 @@ math_Vector math_Vector::Opposite() math_Vector math_Vector::Multiplied(const math_Matrix& theRight)const { - Standard_DimensionError_Raise_if(Length() != theRight.RowNumber(), ""); + Standard_DimensionError_Raise_if (Length() != theRight.RowNumber(), + "math_Vector::Multiplied() - input matrix has wrong dimensions"); math_Vector Result(theRight.LowerColIndex, theRight.UpperColIndex); for(Standard_Integer J2 = theRight.LowerColIndex; J2 <= theRight.UpperColIndex; J2++) @@ -472,7 +489,8 @@ math_Vector math_Vector::Multiplied(const math_Matrix& theRight)const void math_Vector::Multiply(const Standard_Real theLeft, const math_Vector& theRight) { - Standard_DimensionError_Raise_if((Length() != theRight.Length()), ""); + Standard_DimensionError_Raise_if ((Length() != theRight.Length()), + "math_Vector::Multiply() - input vector has wrong dimensions"); for(Standard_Integer I = LowerIndex; I <= UpperIndex; I++) { Array(I) = theLeft * theRight.Array(I); @@ -481,7 +499,8 @@ void math_Vector::Multiply(const Standard_Real theLeft, const math_Vector& theRi math_Vector& math_Vector::Initialized(const math_Vector& theOther) { - Standard_DimensionError_Raise_if(Length() != theOther.Length(), ""); + Standard_DimensionError_Raise_if (Length() != theOther.Length(), + "math_Vector::Initialized() - input vector has wrong dimensions"); (theOther.Array).Copy(Array); return *this;