]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
0020064: EDF 877 VISU : NaN in scalar bar V4_1_0_maintainance_20090617
authorvsr <vsr@opencascade.com>
Tue, 16 Jun 2009 05:24:41 +0000 (05:24 +0000)
committervsr <vsr@opencascade.com>
Tue, 16 Jun 2009 05:24:41 +0000 (05:24 +0000)
Print "NAN values in the presentation" error message to the terminal window in case of NAN values detection.

src/PIPELINE/VISU_ColoredPL.cxx
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx

index 79ec127cd64f3ba3cc5b2f58b9d6b7bc5802867f..3d587d88262d9562ee1d7f6f102af70cba484511 100644 (file)
@@ -148,6 +148,9 @@ void
 VISU_ColoredPL
 ::SetScalarRange(vtkFloatingPointType theRange[2])
 {
+  if (isnan(theRange[0]) || isnan(theRange[1]))
+    throw std::runtime_error("NAN values in the presentation");
+
   if(theRange[0] > theRange[1]) 
     return;
   
@@ -344,7 +347,7 @@ VISU_ColoredPL
   myExtractor->GetOutput()->GetScalarRange(theRange);
 
   if (isnan(theRange[0]) || isnan(theRange[1]))
-    throw std::runtime_error("Arithmetic exception detected");
+    throw std::runtime_error("NAN values in the presentation");
 }
 
 void
index 55e0c78a7d0ec91a4dfc68d4200ec8b9584eb385..750db5b16fe283bdd8ed6ec729975a4d5803a011 100644 (file)
@@ -414,7 +414,7 @@ VISU_DeformedShapeAndScalarMapPL
 ::SetScalarRange(vtkFloatingPointType theRange[2])
 {
   if (isnan(theRange[0]) || isnan(theRange[1]))
-    throw std::runtime_error("Arithmetic exception detected");
+    throw std::runtime_error("NAN values in the presentation");
 
   if(VISU::CheckIsSameRange(theRange, GetScalarRange()))
     return;
@@ -448,5 +448,5 @@ VISU_DeformedShapeAndScalarMapPL
   myScalarsExtractor->GetUnstructuredGridOutput()->GetScalarRange(theRange);
 
   if (isnan(theRange[0]) || isnan(theRange[1]))
-    throw std::runtime_error("Arithmetic exception detected");
+    throw std::runtime_error("NAN values in the presentation");
 }