diff src/ov-re-sparse.cc @ 11129:0de5cc44e690

use gripe functions for NaN to logical and NaN to character conversions more consistently
author John W. Eaton <jwe@octave.org>
date Thu, 21 Oct 2010 16:12:00 -0400
parents b4d2080b6df7
children fd0a3ac60b0e
line wrap: on
line diff
--- a/src/ov-re-sparse.cc	Thu Oct 21 11:58:42 2010 -0700
+++ b/src/ov-re-sparse.cc	Thu Oct 21 16:12:00 2010 -0400
@@ -145,7 +145,7 @@
   NDArray m = matrix.matrix_value ();
 
   if (m.any_element_is_nan ())
-    error ("invalid conversion from NaN to logical");
+    gripe_nan_to_logical_conversion ();
   else if (warn && m.any_element_not_one_or_zero ())
     gripe_logical_conversion ();
 
@@ -188,7 +188,7 @@
 octave_sparse_matrix::sparse_bool_matrix_value (bool warn) const
 {
   if (matrix.any_element_is_nan ())
-    error ("invalid conversion from NaN to logical");
+    gripe_nan_to_logical_conversion ();
   else if (warn && matrix.any_element_not_one_or_zero ())
     gripe_logical_conversion ();
 
@@ -225,7 +225,7 @@
 
               if (xisnan (d))
                 {
-                  ::error ("invalid conversion from NaN to character");
+                  gripe_nan_to_character_conversion ();
                   return retval;
                 }
               else