Salome HOME
Fix bug on messages error.
authorClarisse Genrault <clarisse.genrault@cea.fr>
Wed, 22 Mar 2017 14:43:57 +0000 (15:43 +0100)
committerClarisse Genrault <clarisse.genrault@cea.fr>
Wed, 22 Mar 2017 14:43:57 +0000 (15:43 +0100)
src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Rotation.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.cpp

index 7bddd8e176f83cfe7458ae27c14bfc110dcfcb2a..7be4cccf21a7992e8fda6ea7938cb3242ab1a8d8 100644 (file)
@@ -113,6 +113,7 @@ void FeaturesPlugin_MultiTranslation::performOneDirection()
     std::string aFeatureError = "Multitranslation builder ";
     aFeatureError+=":: the number of copies for the first direction is null or negative.";
     setError(aFeatureError);
+    return;
   }
 
   // Moving each object.
@@ -248,12 +249,14 @@ void FeaturesPlugin_MultiTranslation::performTwoDirection()
     std::string aFeatureError = "Multitranslation builder ";
     aFeatureError+=":: the number of copies for the first direction is null or negative.";
     setError(aFeatureError);
+    return;
   }
 
   if (aSecondNbCopies <=0) {
     std::string aFeatureError = "Multitranslation builder ";
     aFeatureError+=":: the number of copies for the second direction is null or negative.";
     setError(aFeatureError);
+    return;
   }
 
   // Coord aFirstAxis
index 9af02de5f233199b99cb79fd6f695a3a62c7c9f9..9041474edf534f17d4806c09cbac0ca858937f9f 100644 (file)
@@ -66,7 +66,7 @@ bool GeomAlgoAPI_Rotation::check()
     }
     case BY_POINTS: {
       if (!myCenterPoint) {
-        myError = "Rotation builder :: start point is not valid.";
+        myError = "Rotation builder :: center point is not valid.";
         return false;
       }
       if (!myStartPoint) {
@@ -74,7 +74,7 @@ bool GeomAlgoAPI_Rotation::check()
         return false;
       }
       if (!myEndPoint) {
-        myError = "Rotation builder :: start point is not valid.";
+        myError = "Rotation builder :: end point is not valid.";
         return false;
       }
       if (!mySourceShape) {
index d4b94f822ad29034b8cde240f2604429471e7d32..83ee6e5fc02556276e2fa0619bbb7a50d713c883 100644 (file)
@@ -411,15 +411,15 @@ namespace GeomAlgoAPI_ShapeAPI
     const double theStep,
     const int theNumber) throw (GeomAlgoAPI_Exception)
   {
-    if (theNumber <=0) {
+    if (!theAxis) {
       std::string aError = "Multitranslation builder ";
-      aError+=":: the number of copies for the first direction is null or negative.";
+      aError+=":: the first axis is not valid";
       throw GeomAlgoAPI_Exception(aError);
     }
 
-    if (!theAxis) {
+    if (theNumber <=0) {
       std::string aError = "Multitranslation builder ";
-      aError+=":: the first axis is not valid";
+      aError+=":: the number of copies for the first direction is null or negative.";
       throw GeomAlgoAPI_Exception(aError);
     }
 
@@ -441,27 +441,27 @@ namespace GeomAlgoAPI_ShapeAPI
     const double theSecondStep,
     const int theSecondNumber) throw (GeomAlgoAPI_Exception)
   {
-    if (theFirstNumber <=0) {
+    if (!theFirstAxis) {
       std::string aError = "Multitranslation builder ";
-      aError+=":: the number of copies for the first direction is null or negative.";
+      aError+=":: the first axis is not valid";
       throw GeomAlgoAPI_Exception(aError);
     }
 
-    if (theSecondNumber <=0) {
+    if (!theSecondAxis) {
       std::string aError = "Multitranslation builder ";
-      aError+=":: the number of copies for the second direction is null or negative.";
+      aError+=":: the second axis is not valid";
       throw GeomAlgoAPI_Exception(aError);
     }
 
-    if (!theFirstAxis) {
+    if (theFirstNumber <=0) {
       std::string aError = "Multitranslation builder ";
-      aError+=":: the first axis is not valid";
+      aError+=":: the number of copies for the first direction is null or negative.";
       throw GeomAlgoAPI_Exception(aError);
     }
 
-    if (!theSecondAxis) {
+    if (theSecondNumber <=0) {
       std::string aError = "Multitranslation builder ";
-      aError+=":: the second axis is not valid";
+      aError+=":: the number of copies for the second direction is null or negative.";
       throw GeomAlgoAPI_Exception(aError);
     }