GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
error.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1993-2024 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_error_h)
27 #define octave_error_h 1
28 
29 #include "octave-config.h"
30 
31 #include <cstdarg>
32 #include <cinttypes>
33 #include <string>
34 
35 #include "unwind-prot.h"
36 
37 #include "oct-map.h"
38 
39 class octave_value_list;
40 
42 
44 
46 {
47 public:
48 
49  OCTINTERP_API error_system (interpreter& interp);
50 
51  OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (error_system)
52 
53  ~error_system () = default;
54 
55  OCTINTERP_API octave_value
56  debug_on_error (const octave_value_list& args, int nargout);
57 
58  void set_debug_on_error (bool flag) { m_debug_on_error = flag; }
59 
60  bool debug_on_error () const { return m_debug_on_error; }
61 
62  bool debug_on_error (bool flag)
63  {
64  bool val = m_debug_on_error;
65  m_debug_on_error = flag;
66  return val;
67  }
68 
69  OCTINTERP_API octave_value
70  debug_on_caught (const octave_value_list& args, int nargout);
71 
72  void set_debug_on_caught (bool flag) { m_debug_on_caught = flag; }
73 
74  bool debug_on_caught () const { return m_debug_on_caught; }
75 
76  bool debug_on_caught (bool flag)
77  {
78  bool val = m_debug_on_caught;
79  m_debug_on_caught = flag;
80  return val;
81  }
82 
83  OCTINTERP_API octave_value
84  debug_on_warning (const octave_value_list& args, int nargout);
85 
86  void set_debug_on_warning (bool flag) { m_debug_on_warning = flag; }
87 
88  bool debug_on_warning () const { return m_debug_on_warning; }
89 
90  bool debug_on_warning (bool flag)
91  {
92  bool val = m_debug_on_warning;
93  m_debug_on_warning = flag;
94  return val;
95  }
96 
97  OCTINTERP_API octave_value
98  discard_warning_messages (const octave_value_list& args, int nargout);
99 
101  {
102  m_discard_warning_messages = flag;
103  }
104 
106  {
107  return m_discard_warning_messages;
108  }
109 
110  bool discard_warning_messages (bool flag)
111  {
112  bool val = m_discard_warning_messages;
113  m_discard_warning_messages = flag;
114  return val;
115  }
116 
117  OCTINTERP_API octave_value
118  beep_on_error (const octave_value_list& args, int nargout);
119 
120  void set_beep_on_error (bool flag) { m_beep_on_error = flag; }
121 
122  bool beep_on_error () const { return m_beep_on_error; }
123 
124  bool beep_on_error (bool flag)
125  {
126  bool val = m_beep_on_error;
127  m_beep_on_error = flag;
128  return val;
129  }
130 
131  OCTINTERP_API octave_value
132  backtrace_on_warning (const octave_value_list& args, int nargout);
133 
134  void set_backtrace_on_warning (bool flag) { m_backtrace_on_warning = flag; }
135 
136  bool backtrace_on_warning () const { return m_backtrace_on_warning; }
137 
138  bool backtrace_on_warning (bool flag)
139  {
140  bool val = m_backtrace_on_warning;
141  m_backtrace_on_warning = flag;
142  return val;
143  }
144 
145  OCTINTERP_API octave_value
146  verbose_warning (const octave_value_list& args, int nargout);
147 
148  void set_verbose_warning (bool flag) { m_verbose_warning = flag; }
149 
150  bool verbose_warning () const { return m_verbose_warning; }
151 
152  bool verbose_warning (bool flag)
153  {
154  bool val = m_verbose_warning;
155  m_verbose_warning = flag;
156  return val;
157  }
158 
159  OCTINTERP_API octave_value
160  quiet_warning (const octave_value_list& args, int nargout);
161 
162  void set_quiet_warning (bool flag) { m_quiet_warning = flag; }
163 
164  bool quiet_warning () const { return m_quiet_warning; }
165 
166  bool quiet_warning (bool flag)
167  {
168  bool val = m_quiet_warning;
169  m_quiet_warning = flag;
170  return val;
171  }
172 
173  octave_map warning_options () const { return m_warning_options; }
174 
175  void set_warning_options (const octave_map& val)
176  { m_warning_options = val; }
177 
179  {
180  octave_map val = m_warning_options;
181  m_warning_options = new_val;
182  return val;
183  }
184 
185  OCTINTERP_API octave_value
186  last_error_message (const octave_value_list& args, int nargout);
187 
188  void set_last_error_message (const std::string& val)
189  { m_last_error_message = val; }
190 
191  std::string last_error_message () const { return m_last_error_message; }
192 
193  std::string last_error_message (const std::string& s)
194  {
195  std::string val = m_last_error_message;
196  m_last_error_message = s;
197  return val;
198  }
199 
200  OCTINTERP_API octave_value
201  last_warning_message (const octave_value_list& args, int nargout);
202 
203  void set_last_warning_message (const std::string& val)
204  { m_last_warning_message = val; }
205 
206  std::string last_warning_message () const
207  { return m_last_warning_message; }
208 
209  std::string last_warning_message (const std::string& s)
210  {
211  std::string val = m_last_warning_message;
212  m_last_warning_message = s;
213  return val;
214  }
215 
216  OCTINTERP_API octave_value
217  last_warning_id (const octave_value_list& args, int nargout);
218 
219  void set_last_warning_id (const std::string& val)
220  { m_last_warning_id = val; }
221 
222  std::string last_warning_id () const { return m_last_warning_id; }
223 
224  std::string last_warning_id (const std::string& s)
225  {
226  std::string val = m_last_warning_id;
227  m_last_warning_id = s;
228  return val;
229  }
230 
231  OCTINTERP_API octave_value
232  last_error_id (const octave_value_list& args, int nargout);
233 
234  void set_last_error_id (const std::string& val) { m_last_error_id = val; }
235 
236  std::string last_error_id () const { return m_last_error_id; }
237 
238  std::string last_error_id (const std::string& s)
239  {
240  std::string val = m_last_error_id;
241  m_last_error_id = s;
242  return val;
243  }
244 
246  {
247  m_last_error_stack = val;
248  }
249 
250  octave_map last_error_stack () const { return m_last_error_stack; }
251 
253  {
254  octave_map val = m_last_error_stack;
255  m_last_error_stack = new_val;
256  return val;
257  }
258 
259  static OCTINTERP_API octave_map
260  make_stack_map (const std::list<frame_info>& frames);
261 
262  static OCTINTERP_API std::list<frame_info>
263  make_stack_frame_list (const octave_map& stack);
264 
265  //! For given warning ID, return 0 if warnings are disabled, 1 if
266  //! enabled, and 2 if the given ID should be an error instead of a
267  //! warning.
268 
269  OCTINTERP_API int warning_enabled (const std::string& id);
270 
271  OCTINTERP_API void
272  verror (bool save_last_error, std::ostream& os, const char *name,
273  const char *id, const char *fmt, va_list args,
274  bool with_cfn = false);
275 
276  OCTINTERP_API void
277  vwarning (const char *name, const char *id, const char *fmt,
278  va_list args);
279 
280  OCTAVE_NORETURN
281  OCTINTERP_API void
282  error_1 (execution_exception& ee, const char *id, const char *fmt,
283  va_list args);
284 
285  OCTAVE_NORETURN
286  OCTINTERP_API void error_1 (const char *id, const char *fmt, va_list args);
287 
288  OCTAVE_NORETURN
289  OCTINTERP_API void vusage (const char *id, const char *fmt, va_list args);
290 
291  OCTINTERP_API void vwarning (const char *id, const char *fmt, va_list args);
292 
293  OCTAVE_NORETURN
294  OCTINTERP_API void
295  rethrow_error (const std::string& id, const std::string& msg,
296  const octave_map& stack);
297 
298  OCTAVE_NORETURN
299  OCTINTERP_API void vpanic (const char *fmt, va_list args);
300 
301  OCTAVE_NORETURN
302  OCTINTERP_API void panic (const char *fmt, ...);
303 
304  OCTINTERP_API octave_scalar_map warning_query (const std::string& id_arg);
305 
306  OCTINTERP_API std::string default_warning_state ();
307 
308  OCTINTERP_API void display_warning_options (std::ostream& os);
309 
310  OCTINTERP_API void
311  set_warning_option (const std::string& state, const std::string& id);
312 
313  OCTINTERP_API void disable_warning (const std::string& id);
314 
315  OCTINTERP_API void initialize_default_warning_state ();
316 
317  OCTINTERP_API void interpreter_try (unwind_protect& frame);
318 
319  // Throw execution_exception or, if debug_on_error is TRUE, enter
320  // debugger. If stack_info is empty, use current call stack.
321 
322  OCTAVE_NORETURN
323  OCTINTERP_API void
324  throw_error (const std::string& err_type,
325  const std::string& id,
326  const std::string& message,
327  const std::list<frame_info>& stack_info
328  = std::list<frame_info> ());
329 
330  OCTAVE_NORETURN
331  OCTINTERP_API void throw_error (execution_exception& ee);
332 
333  OCTINTERP_API void save_exception (const execution_exception& ee);
334 
335  OCTINTERP_API void display_exception (const execution_exception& ee) const;
336 
337 private:
338 
339  interpreter& m_interpreter;
340 
341  //! TRUE means that Octave will try to enter the debugger when an error
342  //! is encountered. This will also inhibit printing of the normal
343  //! traceback message (you will only see the top-level error message).
344 
345  bool m_debug_on_error;
346 
347  //! TRUE means that Octave will try to enter the debugger when an error
348  //! is encountered within the 'try' section of a 'try' / 'catch' block.
349 
350  bool m_debug_on_caught;
351 
352  //! TRUE means that Octave will try to enter the debugger when a warning
353  //! is encountered.
354 
355  bool m_debug_on_warning;
356 
357  //! TRUE means warning messages are turned off.
358 
359  bool m_discard_warning_messages;
360 
361  //! TRUE means that Octave will try to beep obnoxiously before
362  //! printing error messages.
363  bool m_beep_on_error;
364 
365  //! TRUE means that Octave will try to display a stack trace when a
366  //! warning is encountered.
367  bool m_backtrace_on_warning;
368 
369  //! TRUE means that Octave will print a verbose warning. Currently
370  //! unused.
371  bool m_verbose_warning;
372 
373  //! TRUE means that Octave will print no warnings, but lastwarn will
374  //! be updated
375  bool m_quiet_warning;
376 
377  //! A structure containing (most of) the current state of warnings.
378  octave_map m_warning_options;
379 
380  //! The text of the last error message.
381  std::string m_last_error_message;
382 
383  //! The text of the last warning message.
384  std::string m_last_warning_message;
385 
386  //! The last warning message id.
387  std::string m_last_warning_id;
388 
389  //! The last error message id.
390  std::string m_last_error_id;
391 
392  //! The last file in which an error occurred.
393  octave_map m_last_error_stack;
394 };
395 
396 OCTAVE_END_NAMESPACE(octave)
397 
398 // FIXME: should we move the following functions inside the octave
399 // namespace? If so, should the functions outside of the namespace be
400 // deprecated? Doing that might cause a lot of trouble... If they are
401 // not deprecated and eventually removed, does it make sense to also
402 // define them inside the octave namespace?
403 
404 extern OCTINTERP_API void
405 vmessage (const char *name, const char *fmt, va_list args);
406 
407 OCTAVE_FORMAT_PRINTF (2, 3)
408 extern OCTINTERP_API void message (const char *name, const char *fmt, ...);
409 
410 extern OCTINTERP_API void vwarning (const char *fmt, va_list args);
411 
412 OCTAVE_FORMAT_PRINTF (1, 2)
413 extern OCTINTERP_API void warning (const char *fmt, ...);
414 
415 OCTAVE_NORETURN
416 extern OCTINTERP_API void verror (const char *fmt, va_list args);
417 
418 OCTAVE_FORMAT_PRINTF (1, 2)
419 OCTAVE_NORETURN
420 extern OCTINTERP_API void error (const char *fmt, ...);
421 
422 OCTAVE_NORETURN
423 extern OCTINTERP_API void
424 verror (octave::execution_exception&, const char *fmt, va_list args);
425 
426 OCTAVE_FORMAT_PRINTF (2, 3)
427 OCTAVE_NORETURN
428 extern OCTINTERP_API void
429 error (octave::execution_exception&, const char *fmt, ...);
430 
431 OCTAVE_NORETURN
432 extern OCTINTERP_API void
433 verror_with_cfn (const char *fmt, va_list args);
434 
435 OCTAVE_FORMAT_PRINTF (1, 2)
436 OCTAVE_NORETURN
437 extern OCTINTERP_API void
438 error_with_cfn (const char *fmt, ...);
439 
440 OCTAVE_NORETURN
441 extern OCTINTERP_API void
442 vparse_error (const char *fmt, va_list args);
443 
444 OCTAVE_FORMAT_PRINTF (1, 2)
445 OCTAVE_NORETURN
446 extern OCTINTERP_API void
447 parse_error (const char *fmt, ...);
448 
449 OCTAVE_NORETURN
450 extern OCTINTERP_API void
451 vusage_with_id (const char *id, const char *fmt, va_list args);
452 
453 OCTAVE_FORMAT_PRINTF (2, 3)
454 OCTAVE_NORETURN
455 extern OCTINTERP_API void
456 usage_with_id (const char *id, const char *fmt, ...);
457 
458 extern OCTINTERP_API void
459 vwarning_with_id (const char *id, const char *fmt, va_list args);
460 
461 OCTAVE_FORMAT_PRINTF (2, 3)
462 extern OCTINTERP_API void
463 warning_with_id (const char *id, const char *fmt, ...);
464 
465 OCTAVE_NORETURN
466 extern OCTINTERP_API void
467 verror_with_id (const char *id, const char *fmt, va_list args);
468 
469 OCTAVE_FORMAT_PRINTF (2, 3)
470 OCTAVE_NORETURN
471 extern OCTINTERP_API void
472 error_with_id (const char *id, const char *fmt, ...);
473 
474 OCTAVE_NORETURN
475 extern OCTINTERP_API void
476 verror_with_id_cfn (const char *id, const char *fmt, va_list args);
477 
478 OCTAVE_FORMAT_PRINTF (2, 3)
479 OCTAVE_NORETURN
480 extern OCTINTERP_API void
481 error_with_id_cfn (const char *id, const char *fmt, ...);
482 
483 OCTAVE_NORETURN
484 extern OCTINTERP_API void
485 vparse_error_with_id (const char *id, const char *fmt, va_list args);
486 
487 OCTAVE_FORMAT_PRINTF (2, 3)
488 OCTAVE_NORETURN
489 extern OCTINTERP_API void
490 parse_error_with_id (const char *id, const char *fmt, ...);
491 
492 OCTAVE_NORETURN
493 extern OCTINTERP_API void vpanic (const char *fmt, va_list args);
494 
495 OCTAVE_FORMAT_PRINTF (1, 2)
496 OCTAVE_NORETURN
497 extern OCTINTERP_API void panic (const char *fmt, ...);
498 
499 // To allow the __FILE__ and __LINE__ macros to work as expected, the
500 // panic_impossible, panic_if, panic_unless, error_impossible, error_if,
501 // and error_unless symbols must be defined as macros.
502 
503 #define panic_impossible() \
504  ::panic ("impossible state reached in file '%s' at line %d", __FILE__, __LINE__)
505 
506 #if defined (NDEBUG)
507 # define panic_if(cond)
508 #else
509 # define panic_if(cond) do { if (cond) panic_impossible (); } while (0)
510 #endif
511 
512 #if defined (NDEBUG)
513 # define panic_unless(cond)
514 #else
515 # define panic_unless(cond) panic_if (! (cond))
516 #endif
517 
518 #define error_impossible() \
519  ::error ("impossible state reached in file '%s' at line %d", __FILE__, __LINE__)
520 
521 #if defined (NDEBUG)
522 # define error_if(cond)
523 #else
524 # define error_if(cond) do { if (cond) error_impossible (); } while (0)
525 #endif
526 
527 #if defined (NDEBUG)
528 # define error_unless(cond)
529 #else
530 # define error_unless(cond) error_if (! (cond))
531 #endif
532 
534 
535 //! Helper function for print_usage defined in defun.cc.
536 
537 extern OCTINTERP_API void defun_usage_message (const std::string& msg);
538 
539 // Convenience functions.
540 
541 extern OCTINTERP_API octave_value_list
542 set_warning_state (const std::string& id, const std::string& state);
543 
544 extern OCTINTERP_API octave_value_list
546 
547 extern OCTINTERP_API int warning_enabled (const std::string& id);
548 
549 extern OCTINTERP_API void disable_warning (const std::string& id);
550 
551 extern OCTINTERP_API void interpreter_try (octave::unwind_protect&);
552 
553 OCTAVE_END_NAMESPACE(octave)
554 
555 #endif
error_system(interpreter &interp)
Definition: error.cc:257
~error_system()=default
bool debug_on_error(bool flag)
Definition: error.h:62
std::string last_error_message() const
Definition: error.h:191
void set_beep_on_error(bool flag)
Definition: error.h:120
void interpreter_try(unwind_protect &frame)
Definition: error.cc:868
void display_warning_options(std::ostream &os)
Definition: error.cc:735
void set_last_warning_id(const std::string &val)
Definition: error.h:219
void set_discard_warning_messages(bool flag)
Definition: error.h:100
static std::list< frame_info > make_stack_frame_list(const octave_map &stack)
Definition: error.cc:399
void set_quiet_warning(bool flag)
Definition: error.h:162
void set_last_warning_message(const std::string &val)
Definition: error.h:203
std::string last_warning_id() const
Definition: error.h:222
bool debug_on_error() const
Definition: error.h:60
OCTAVE_NORETURN void error_1(execution_exception &ee, const char *id, const char *fmt, va_list args)
Definition: error.cc:568
OCTAVE_NORETURN void vpanic(const char *fmt, va_list args)
Definition: error.cc:634
std::string last_warning_id(const std::string &s)
Definition: error.h:224
bool debug_on_warning() const
Definition: error.h:88
void verror(bool save_last_error, std::ostream &os, const char *name, const char *id, const char *fmt, va_list args, bool with_cfn=false)
void set_warning_option(const std::string &state, const std::string &id)
Definition: error.cc:776
std::string last_warning_message(const std::string &s)
Definition: error.h:209
bool beep_on_error() const
Definition: error.h:122
OCTAVE_NORETURN void rethrow_error(const std::string &id, const std::string &msg, const octave_map &stack)
Definition: error.cc:604
bool verbose_warning() const
Definition: error.h:150
octave_scalar_map warning_query(const std::string &id_arg)
Definition: error.cc:654
std::string last_error_id(const std::string &s)
Definition: error.h:238
OCTAVE_NORETURN void throw_error(const std::string &err_type, const std::string &id, const std::string &message, const std::list< frame_info > &stack_info=std::list< frame_info >())
Definition: error.cc:881
octave_map last_error_stack() const
Definition: error.h:250
int warning_enabled(const std::string &id)
For given warning ID, return 0 if warnings are disabled, 1 if enabled, and 2 if the given ID should b...
Definition: error.cc:424
std::string last_warning_message() const
Definition: error.h:206
octave_map warning_options(const octave_map &new_val)
Definition: error.h:178
bool verbose_warning(bool flag)
Definition: error.h:152
octave_map last_error_stack(const octave_map &new_val)
Definition: error.h:252
static octave_map make_stack_map(const std::list< frame_info > &frames)
Definition: error.cc:372
OCTAVE_NORETURN void vusage(const char *id, const char *fmt, va_list args)
Definition: error.cc:497
bool backtrace_on_warning(bool flag)
Definition: error.h:138
bool debug_on_caught(bool flag)
Definition: error.h:76
bool discard_warning_messages() const
Definition: error.h:105
octave_map warning_options() const
Definition: error.h:173
void set_last_error_stack(const octave_map &val)
Definition: error.h:245
void disable_warning(const std::string &id)
Definition: error.cc:841
void initialize_default_warning_state()
Definition: error.cc:847
void vwarning(const char *name, const char *id, const char *fmt, va_list args)
Definition: error.cc:506
void set_debug_on_warning(bool flag)
Definition: error.h:86
bool debug_on_caught() const
Definition: error.h:74
void set_verbose_warning(bool flag)
Definition: error.h:148
std::string last_error_id() const
Definition: error.h:236
void save_exception(const execution_exception &ee)
Definition: error.cc:912
void set_last_error_id(const std::string &val)
Definition: error.h:234
bool discard_warning_messages(bool flag)
Definition: error.h:110
void set_backtrace_on_warning(bool flag)
Definition: error.h:134
bool quiet_warning() const
Definition: error.h:164
bool quiet_warning(bool flag)
Definition: error.h:166
bool beep_on_error(bool flag)
Definition: error.h:124
bool backtrace_on_warning() const
Definition: error.h:136
std::string default_warning_state()
Definition: error.cc:711
void set_debug_on_caught(bool flag)
Definition: error.h:72
void display_exception(const execution_exception &ee) const
Definition: error.cc:924
bool debug_on_warning(bool flag)
Definition: error.h:90
std::string last_error_message(const std::string &s)
Definition: error.h:193
void set_warning_options(const octave_map &val)
Definition: error.h:175
OCTAVE_NORETURN void panic(const char *fmt,...)
Definition: error.cc:645
void set_last_error_message(const std::string &val)
Definition: error.h:188
void set_debug_on_error(bool flag)
Definition: error.h:58
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void warning(const char *fmt,...)
Definition: error.cc:1063
OCTAVE_NORETURN void panic(const char *fmt,...)
Definition: error.cc:1127
void warning_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1078
OCTAVE_NORETURN void vusage_with_id(const char *id, const char *fmt, va_list args)
Definition: error.cc:965
void interpreter_try(octave::unwind_protect &)
OCTAVE_NORETURN void verror_with_cfn(const char *fmt, va_list args)
Definition: error.cc:1012
void vwarning(const char *fmt, va_list args)
Definition: error.cc:1057
OCTAVE_NORETURN void vpanic(const char *fmt, va_list args)
Definition: error.cc:1118
void vwarning_with_id(const char *id, const char *fmt, va_list args)
Definition: error.cc:1072
OCTAVE_NORETURN void usage_with_id(const char *id, const char *fmt,...)
Definition: error.cc:973
OCTAVE_NORETURN void error_with_id_cfn(const char *id, const char *fmt,...)
Definition: error.cc:1048
OCTAVE_NORETURN void verror_with_id(const char *id, const char *fmt, va_list args)
Definition: error.cc:1027
OCTAVE_NORETURN void error(const char *fmt,...)
Definition: error.cc:988
OCTAVE_NORETURN void error_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1033
OCTAVE_NORETURN void verror(const char *fmt, va_list args)
Definition: error.cc:982
OCTAVE_NORETURN void error_with_cfn(const char *fmt,...)
Definition: error.cc:1018
OCTAVE_NORETURN void verror_with_id_cfn(const char *id, const char *fmt, va_list args)
Definition: error.cc:1042
void defun_usage_message(const std::string &msg)
Helper function for print_usage defined in defun.cc.
Definition: error.cc:1138
OCTAVE_NORETURN void parse_error(const char *fmt,...)
Definition: error.cc:1093
void message(const char *name, const char *fmt,...)
Definition: error.cc:956
OCTAVE_NORETURN void vparse_error(const char *fmt, va_list args)
Definition: error.cc:1087
OCTAVE_NORETURN void vparse_error_with_id(const char *id, const char *fmt, va_list args)
Definition: error.cc:1102
octave_value_list set_warning_state(const std::string &id, const std::string &state)
void vmessage(const char *name, const char *fmt, va_list args)
Definition: error.cc:942
void disable_warning(const std::string &id)
OCTAVE_NORETURN void parse_error_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1108
int warning_enabled(const std::string &id)