comparison libinterp/corefcn/cellfun.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 4b601ca024d5
children c714266d9f0d
comparison
equal deleted inserted replaced
33249:06a308cae32c 33250:40fde86be9b0
1988 template <typename Array2D> 1988 template <typename Array2D>
1989 static Cell 1989 static Cell
1990 do_mat2cell_2d (const Array2D& a, const Array<octave_idx_type> *d, int nd) 1990 do_mat2cell_2d (const Array2D& a, const Array<octave_idx_type> *d, int nd)
1991 { 1991 {
1992 Cell retval; 1992 Cell retval;
1993 error_unless (nd == 1 || nd == 2); 1993
1994 error_unless (a.ndims () == 2); 1994 panic_unless (nd == 1 || nd == 2);
1995 panic_unless (a.ndims () == 2);
1995 1996
1996 if (mat2cell_mismatch (a.dims (), d, nd)) 1997 if (mat2cell_mismatch (a.dims (), d, nd))
1997 return retval; 1998 return retval;
1998 1999
1999 octave_idx_type nridx = d[0].numel (); 2000 octave_idx_type nridx = d[0].numel ();
2045 template <typename ArrayND> 2046 template <typename ArrayND>
2046 Cell 2047 Cell
2047 do_mat2cell_nd (const ArrayND& a, const Array<octave_idx_type> *d, int nd) 2048 do_mat2cell_nd (const ArrayND& a, const Array<octave_idx_type> *d, int nd)
2048 { 2049 {
2049 Cell retval; 2050 Cell retval;
2050 error_unless (nd >= 1); 2051
2052 panic_unless (nd >= 1);
2051 2053
2052 if (mat2cell_mismatch (a.dims (), d, nd)) 2054 if (mat2cell_mismatch (a.dims (), d, nd))
2053 return retval; 2055 return retval;
2054 2056
2055 // For each dimension, count the number of partitions specified. 2057 // For each dimension, count the number of partitions specified.
2127 2129
2128 Cell 2130 Cell
2129 do_mat2cell (octave_value& a, const Array<octave_idx_type> *d, int nd) 2131 do_mat2cell (octave_value& a, const Array<octave_idx_type> *d, int nd)
2130 { 2132 {
2131 Cell retval; 2133 Cell retval;
2132 error_unless (nd >= 1); 2134
2135 panic_unless (nd >= 1);
2133 2136
2134 if (mat2cell_mismatch (a.dims (), d, nd)) 2137 if (mat2cell_mismatch (a.dims (), d, nd))
2135 return retval; 2138 return retval;
2136 2139
2137 dim_vector rdv = dim_vector::alloc (nd); 2140 dim_vector rdv = dim_vector::alloc (nd);