26 #if defined (HAVE_CONFIG_H)
44 = "Octave:nonconformant-args";
47 = "Octave:index-out-of-bounds";
52 = "Octave:nearly-singular-matrix";
59 (*current_liboctave_error_handler)
60 (
"invalid conversion from NaN to logical");
66 (*current_liboctave_error_handler)
67 (
"invalid conversion from NaN to character");
76 (*current_liboctave_error_with_id_handler)
77 (err_id,
"%s: nonconformant arguments (op1 len: %" OCTAVE_IDX_TYPE_FORMAT
78 ", op2 len: % " OCTAVE_IDX_TYPE_FORMAT
")",
79 op, op1_len, op2_len);
89 (*current_liboctave_error_with_id_handler)
90 (err_id,
"%s: nonconformant arguments "
91 "(op1 is %" OCTAVE_IDX_TYPE_FORMAT
"x%" OCTAVE_IDX_TYPE_FORMAT
", "
92 "op2 is %" OCTAVE_IDX_TYPE_FORMAT
"x%" OCTAVE_IDX_TYPE_FORMAT
")",
93 op, op1_nr, op1_nc, op2_nr, op2_nc);
102 std::string op1_dims_str = op1_dims.
str ();
103 std::string op2_dims_str = op2_dims.
str ();
105 (*current_liboctave_error_with_id_handler)
106 (err_id,
"%s: nonconformant arguments (op1 is %s, op2 is %s)",
107 op, op1_dims_str.c_str (), op2_dims_str.c_str ());
116 (*current_liboctave_error_with_id_handler)
117 (err_id,
"A(%s) = []: index out of bounds: value %" OCTAVE_IDX_TYPE_FORMAT
118 " out of bound %" OCTAVE_IDX_TYPE_FORMAT,
119 is1d ?
"I" :
"..,I,..", idx, ext);
129 std::ostringstream buf;
136 bool show_parens =
m_dim > 0;
148 buf <<
"(...[x" <<
m_dim - 1 <<
"]...";
164 buf <<
"...[x" <<
m_nd -
m_dim <<
"]...)";
184 static std::string exp
185 = std::to_string (std::numeric_limits<octave_idx_type>::digits);
188 +
": subscripts must be either integers 1 to (2^" + exp
189 +
")-1 or logicals");
219 const std::string& var)
221 std::ostringstream buf;
228 if (
n + 1 != nearest && (buf.str ().find (
'.') == std::string::npos))
229 buf << std::showpos << (
n + 1 - nearest);
252 set_message (
expression () +
": out of bound "
254 +
" (dimensions are " +
m_size.
str (
'x') +
")");
277 throw out_of_range (std::to_string (idx), nd, dim, ext, dv);
283 (*current_liboctave_error_with_id_handler)
284 (
"Octave:invalid-resize",
285 "Invalid resizing operation or ambiguous assignment to an out-of-bounds array element");
293 (*current_liboctave_warning_with_id_handler)
295 "matrix singular to machine precision");
299 (*current_liboctave_warning_with_id_handler)
301 "matrix singular to machine precision, rcond = %g", rcond);
Vector representing the dimensions (size) of an Array.
OCTAVE_API std::string str(char sep='x') const
OCTAVE_API std::string expression(void) const
void update_message(void)
const char * err_id(void) const
invalid_index(const std::string &value, octave_idx_type ndim, octave_idx_type dimen)
void update_message(void)
out_of_range(const std::string &value, octave_idx_type nd, octave_idx_type dim, octave_idx_type ext, const dim_vector &size)
const char * err_id(void) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void err_invalid_resize(void)
static const char * error_id_index_out_of_bounds
static const char * warning_id_singular_matrix
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
void err_invalid_index(const std::string &idx, octave_idx_type nd, octave_idx_type dim, const std::string &)
void err_index_out_of_range(int nd, int dim, octave_idx_type idx, octave_idx_type ext, const dim_vector &dv)
void err_nan_to_logical_conversion(void)
void err_nan_to_character_conversion(void)
void err_del_index_out_of_range(bool is1d, octave_idx_type idx, octave_idx_type ext)
void warn_singular_matrix(double rcond)
static const char * error_id_invalid_index
static const char * error_id_nonconformant_args
static const char * warning_id_nearly_singular_matrix
std::complex< T > floor(const std::complex< T > &x)