[SCM] OCE packaging branch, upstream, updated. OCE-0.6.0-230-g17bea23

Jerome Robert jeromerobert at users.sf.net
Fri Feb 24 18:50:20 UTC 2012


The following commit has been merged in the upstream branch:
commit ebddf3abed1a0b0b0f550c8e04bbbca2a42d081a
Author: Jerome Robert <jeromerobert at users.sf.net>
Date:   Thu Jan 12 18:22:30 2012 +0100

    Geom_BSplineCurve.cxx: Add explicit exception message

diff --git a/src/Geom/Geom_BSplineCurve.cxx b/src/Geom/Geom_BSplineCurve.cxx
index 1f4e7a7..28f36dd 100644
--- a/src/Geom/Geom_BSplineCurve.cxx
+++ b/src/Geom/Geom_BSplineCurve.cxx
@@ -45,20 +45,22 @@ static void CheckCurveData
  const Standard_Boolean            Periodic)
 {
   if (Degree < 1 || Degree > Geom_BSplineCurve::MaxDegree()) {
-    Standard_ConstructionError::Raise();  
+    Standard_ConstructionError::Raise("BSpline degree smaller than 1 or greeter than max value.");
   }
   
-  if (CPoles.Length() < 2)                Standard_ConstructionError::Raise();
-  if (CKnots.Length() != CMults.Length()) Standard_ConstructionError::Raise();
+  if (CPoles.Length() < 2)
+    Standard_ConstructionError::Raise("BSpline with less than 2 poles");
+  if (CKnots.Length() != CMults.Length())
+    Standard_ConstructionError::Raise("BSpline with number of knots different of number of knot multiplicity");
   
   for (Standard_Integer I = CKnots.Lower(); I < CKnots.Upper(); I++) {
     if (CKnots (I+1) - CKnots (I) <= Epsilon (Abs(CKnots (I)))) {
-      Standard_ConstructionError::Raise();
+      Standard_ConstructionError::Raise("Too small distance between knots in a BSpline curve");
     }
   }
   
   if (CPoles.Length() != BSplCLib::NbPoles(Degree,Periodic,CMults))
-    Standard_ConstructionError::Raise();
+    Standard_ConstructionError::Raise("Wrong number of poles in a BSpline curve: "+CPoles.Length());
 }
 
 //=======================================================================

-- 
OCE packaging



More information about the debian-science-commits mailing list