diff libinterp/corefcn/pr-output.cc @ 33250:40fde86be9b0

replace calls to error_* with corresponding panic_* functions in libinterp Affected files: __isprimelarge__.cc, cellfun.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc, graphics.cc, kron.cc, mex.cc, oct-map.cc, oct-stream.cc, pr-output.cc, schur.cc, variables.cc, and ops.h.
author John W. Eaton <jwe@octave.org>
date Mon, 25 Mar 2024 00:42:04 -0400
parents 49128bdb9eb2
children 79cfa1b7a813
line wrap: on
line diff
--- a/libinterp/corefcn/pr-output.cc	Sun Mar 24 18:12:06 2024 -0400
+++ b/libinterp/corefcn/pr-output.cc	Mon Mar 25 00:42:04 2024 -0400
@@ -300,7 +300,7 @@
 pr_max_internal (const MArray<T>& m)
 {
   // We expect a 2-d array.
-  error_unless (m.ndims () == 2);
+  panic_unless (m.ndims () == 2);
 
   octave_idx_type nr = m.rows ();
   octave_idx_type nc = m.columns ();
@@ -680,7 +680,8 @@
 static inline float_display_format
 make_matrix_format (const MT& m)
 {
-  error_unless (m.ndims () == 2);
+  // We expect a 2-d array.
+  panic_unless (m.ndims () == 2);
 
   if (free_format)
     return float_display_format ();
@@ -1569,7 +1570,7 @@
 print_empty_matrix (std::ostream& os, octave_idx_type nr, octave_idx_type nc,
                     bool pr_as_read_syntax)
 {
-  error_unless (nr == 0 || nc == 0);
+  panic_unless (nr == 0 || nc == 0);
 
   if (pr_as_read_syntax)
     {
@@ -1591,7 +1592,7 @@
 print_empty_nd_array (std::ostream& os, const dim_vector& dims,
                       bool pr_as_read_syntax)
 {
-  error_unless (dims.any_zero ());
+  panic_unless (dims.any_zero ());
 
   if (pr_as_read_syntax)
     os << "zeros (" << dims.str (',') << ')';