diff libinterp/octave-value/ov-str-mat.cc @ 33362:2949b89f9711

replace most uses of panic_impossible with error in octave_value classes * ov-base-diag.cc, ov-base-mat.cc, ov-base-scalar.cc, ov-base-sparse.cc, ov-base.cc, ov-bool-mat.cc, ov-cell.cc, ov-class.cc, ov-cx-mat.cc, ov-fcn-handle.cc, ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-perm.cc, ov-range.cc, ov-re-mat.cc, ov-str-mat.cc, ov-struct.cc, ov-usr-fcn.cc: Replace all uses of panic_impossible with error.
author John W. Eaton <jwe@octave.org>
date Mon, 08 Apr 2024 19:39:34 -0400
parents f53ac65ffba6
children 976638dd9021
line wrap: on
line diff
--- a/libinterp/octave-value/ov-str-mat.cc	Mon Apr 08 19:39:04 2024 -0400
+++ b/libinterp/octave-value/ov-str-mat.cc	Mon Apr 08 19:39:34 2024 -0400
@@ -344,8 +344,7 @@
           os << "# length: " << len << "\n";
           std::string tstr = chm.row_as_string (i);
           const char *tmp = tstr.data ();
-          if (tstr.length () > len)
-            panic_impossible ();
+          panic_if (tstr.length () > len);
           os.write (tmp, len);
           os << "\n";
         }
@@ -463,7 +462,7 @@
         }
     }
   else
-    panic_impossible ();
+    error ("unexpected dimensions keyword (= '%s') octave_char_matrix::load_ascii - please report this bug", kw.c_str ());
 
   return true;
 }