GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
error.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1993-2023 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  error_system (const error_system&) = delete;
52 
54 
55  ~error_system (void) = default;
56 
57  OCTINTERP_API octave_value
58  debug_on_error (const octave_value_list& args, int nargout);
59 
60  void set_debug_on_error (bool flag) { m_debug_on_error = flag; }
61 
62  bool debug_on_error (void) const { return m_debug_on_error; }
63 
64  bool debug_on_error (bool flag)
65  {
66  bool val = m_debug_on_error;
67  m_debug_on_error = flag;
68  return val;
69  }
70 
71  OCTINTERP_API octave_value
72  debug_on_caught (const octave_value_list& args, int nargout);
73 
74  void set_debug_on_caught (bool flag) { m_debug_on_caught = flag; }
75 
76  bool debug_on_caught (void) const { return m_debug_on_caught; }
77 
78  bool debug_on_caught (bool flag)
79  {
80  bool val = m_debug_on_caught;
81  m_debug_on_caught = flag;
82  return val;
83  }
84 
85  OCTINTERP_API octave_value
86  debug_on_warning (const octave_value_list& args, int nargout);
87 
88  void set_debug_on_warning (bool flag) { m_debug_on_warning = flag; }
89 
90  bool debug_on_warning (void) const { return m_debug_on_warning; }
91 
92  bool debug_on_warning (bool flag)
93  {
94  bool val = m_debug_on_warning;
95  m_debug_on_warning = flag;
96  return val;
97  }
98 
99  OCTINTERP_API octave_value
100  discard_warning_messages (const octave_value_list& args, int nargout);
101 
103  {
105  }
106 
107  bool discard_warning_messages (void) const
108  {
110  }
111 
112  bool discard_warning_messages (bool flag)
113  {
114  bool val = m_discard_warning_messages;
116  return val;
117  }
118 
119  OCTINTERP_API octave_value
120  beep_on_error (const octave_value_list& args, int nargout);
121 
122  void set_beep_on_error (bool flag) { m_beep_on_error = flag; }
123 
124  bool beep_on_error (void) const { return m_beep_on_error; }
125 
126  bool beep_on_error (bool flag)
127  {
128  bool val = m_beep_on_error;
129  m_beep_on_error = flag;
130  return val;
131  }
132 
133  OCTINTERP_API octave_value
134  backtrace_on_warning (const octave_value_list& args, int nargout);
135 
137 
138  bool backtrace_on_warning (void) const { return m_backtrace_on_warning; }
139 
140  bool backtrace_on_warning (bool flag)
141  {
142  bool val = m_backtrace_on_warning;
143  m_backtrace_on_warning = flag;
144  return val;
145  }
146 
147  OCTINTERP_API octave_value
148  verbose_warning (const octave_value_list& args, int nargout);
149 
150  void set_verbose_warning (bool flag) { m_verbose_warning = flag; }
151 
152  bool verbose_warning (void) const { return m_verbose_warning; }
153 
154  bool verbose_warning (bool flag)
155  {
156  bool val = m_verbose_warning;
157  m_verbose_warning = flag;
158  return val;
159  }
160 
161  OCTINTERP_API octave_value
162  quiet_warning (const octave_value_list& args, int nargout);
163 
164  void set_quiet_warning (bool flag) { m_quiet_warning = flag; }
165 
166  bool quiet_warning (void) const { return m_quiet_warning; }
167 
168  bool quiet_warning (bool flag)
169  {
170  bool val = m_quiet_warning;
171  m_quiet_warning = flag;
172  return val;
173  }
174 
176 
177  void set_warning_options (const octave_map& val)
178  { m_warning_options = val; }
179 
181  {
183  m_warning_options = new_val;
184  return val;
185  }
186 
187  OCTINTERP_API octave_value
188  last_error_message (const octave_value_list& args, int nargout);
189 
190  void set_last_error_message (const std::string& val)
191  { m_last_error_message = val; }
192 
193  std::string last_error_message (void) const { return m_last_error_message; }
194 
195  std::string last_error_message (const std::string& s)
196  {
197  std::string val = m_last_error_message;
199  return val;
200  }
201 
202  OCTINTERP_API octave_value
203  last_warning_message (const octave_value_list& args, int nargout);
204 
205  void set_last_warning_message (const std::string& val)
206  { m_last_warning_message = val; }
207 
208  std::string last_warning_message (void) const
209  { return m_last_warning_message; }
210 
211  std::string last_warning_message (const std::string& s)
212  {
213  std::string val = m_last_warning_message;
215  return val;
216  }
217 
218  OCTINTERP_API octave_value
219  last_warning_id (const octave_value_list& args, int nargout);
220 
221  void set_last_warning_id (const std::string& val)
222  { m_last_warning_id = val; }
223 
224  std::string last_warning_id (void) const { return m_last_warning_id; }
225 
226  std::string last_warning_id (const std::string& s)
227  {
228  std::string val = m_last_warning_id;
229  m_last_warning_id = s;
230  return val;
231  }
232 
233  OCTINTERP_API octave_value
234  last_error_id (const octave_value_list& args, int nargout);
235 
236  void set_last_error_id (const std::string& val) { m_last_error_id = val; }
237 
238  std::string last_error_id (void) const { return m_last_error_id; }
239 
240  std::string last_error_id (const std::string& s)
241  {
242  std::string val = m_last_error_id;
243  m_last_error_id = s;
244  return val;
245  }
246 
248  {
249  m_last_error_stack = val;
250  }
251 
253 
255  {
257  m_last_error_stack = new_val;
258  return val;
259  }
260 
261  static OCTINTERP_API octave_map
262  make_stack_map (const std::list<frame_info>& frames);
263 
264  static OCTINTERP_API std::list<frame_info>
265  make_stack_frame_list (const octave_map& stack);
266 
267  //! For given warning ID, return 0 if warnings are disabled, 1 if
268  //! enabled, and 2 if the given ID should be an error instead of a
269  //! warning.
270 
271  OCTINTERP_API int warning_enabled (const std::string& id);
272 
273  OCTINTERP_API void
274  verror (bool save_last_error, std::ostream& os, const char *name,
275  const char *id, const char *fmt, va_list args,
276  bool with_cfn = false);
277 
278  OCTINTERP_API void
279  vwarning (const char *name, const char *id, const char *fmt,
280  va_list args);
281 
282  OCTAVE_NORETURN
283  OCTINTERP_API void
284  error_1 (execution_exception& ee, const char *id, const char *fmt,
285  va_list args);
286 
287  OCTAVE_NORETURN
288  OCTINTERP_API void error_1 (const char *id, const char *fmt, va_list args);
289 
290  OCTAVE_NORETURN
291  OCTINTERP_API void vusage (const char *id, const char *fmt, va_list args);
292 
293  OCTINTERP_API void vwarning (const char *id, const char *fmt, va_list args);
294 
295  OCTAVE_NORETURN
296  OCTINTERP_API void
297  rethrow_error (const std::string& id, const std::string& msg,
298  const octave_map& stack);
299 
300  OCTAVE_NORETURN
301  OCTINTERP_API void vpanic (const char *fmt, va_list args);
302 
303  OCTAVE_NORETURN
304  OCTINTERP_API void panic (const char *fmt, ...);
305 
306  OCTINTERP_API octave_scalar_map warning_query (const std::string& id_arg);
307 
308  OCTINTERP_API std::string default_warning_state (void);
309 
310  OCTINTERP_API void display_warning_options (std::ostream& os);
311 
312  OCTINTERP_API void
313  set_warning_option (const std::string& state, const std::string& id);
314 
315  OCTINTERP_API void disable_warning (const std::string& id);
316 
317  OCTINTERP_API void initialize_default_warning_state (void);
318 
319  OCTINTERP_API void interpreter_try (unwind_protect& frame);
320 
321  // Throw execution_exception or, if debug_on_error is TRUE, enter
322  // debugger. If stack_info is empty, use current call stack.
323 
324  OCTAVE_NORETURN
325  OCTINTERP_API void
326  throw_error (const std::string& err_type,
327  const std::string& id,
328  const std::string& message,
329  const std::list<frame_info>& stack_info
330  = std::list<frame_info> ());
331 
332  OCTAVE_NORETURN
333  OCTINTERP_API void throw_error (execution_exception& ee);
334 
335  OCTINTERP_API void save_exception (const execution_exception& ee);
336 
337  // FIXME
338  //#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
339  OCTAVE_DEPRECATED (7, "second argument is no longer accepted")
340  OCTINTERP_API void display_exception (const execution_exception& ee,
341  std::ostream& os) const;
342  //#endif
343 
344  OCTINTERP_API void display_exception (const execution_exception& ee) const;
345 
346 private:
347 
349 
350  //! TRUE means that Octave will try to enter the debugger when an error
351  //! is encountered. This will also inhibit printing of the normal
352  //! traceback message (you will only see the top-level error message).
353 
355 
356  //! TRUE means that Octave will try to enter the debugger when an error
357  //! is encountered within the 'try' section of a 'try' / 'catch' block.
358 
360 
361  //! TRUE means that Octave will try to enter the debugger when a warning
362  //! is encountered.
363 
365 
366  //! TRUE means warning messages are turned off.
367 
369 
370  //! TRUE means that Octave will try to beep obnoxiously before
371  //! printing error messages.
373 
374  //! TRUE means that Octave will try to display a stack trace when a
375  //! warning is encountered.
377 
378  //! TRUE means that Octave will print a verbose warning. Currently
379  //! unused.
381 
382  //! TRUE means that Octave will print no warnings, but lastwarn will
383  //! be updated
385 
386  //! A structure containing (most of) the current state of warnings.
388 
389  //! The text of the last error message.
390  std::string m_last_error_message;
391 
392  //! The text of the last warning message.
394 
395  //! The last warning message id.
396  std::string m_last_warning_id;
397 
398  //! The last error message id.
399  std::string m_last_error_id;
400 
401  //! The last file in which an error occurred.
403 };
404 
406 
407 // FIXME: should we move the following functions inside the octave
408 // namespace? If so, should the functions outside of the namespace be
409 // deprecated? Doing that might cause a lot of trouble... If they are
410 // not deprecated and eventually removed, does it make sense to also
411 // define them inside the octave namespace?
412 
413 extern OCTINTERP_API void
414 vmessage (const char *name, const char *fmt, va_list args);
415 
416 OCTAVE_FORMAT_PRINTF (2, 3)
417 extern OCTINTERP_API void message (const char *name, const char *fmt, ...);
418 
419 extern OCTINTERP_API void vwarning (const char *fmt, va_list args);
420 
421 OCTAVE_FORMAT_PRINTF (1, 2)
422 extern OCTINTERP_API void warning (const char *fmt, ...);
423 
424 OCTAVE_NORETURN
425 extern OCTINTERP_API void verror (const char *fmt, va_list args);
426 
427 OCTAVE_FORMAT_PRINTF (1, 2)
428 OCTAVE_NORETURN
429 extern OCTINTERP_API void error (const char *fmt, ...);
430 
431 OCTAVE_NORETURN
432 extern OCTINTERP_API void
433 verror (octave::execution_exception&, const char *fmt, va_list args);
434 
435 OCTAVE_FORMAT_PRINTF (2, 3)
436 OCTAVE_NORETURN
437 extern OCTINTERP_API void
438 error (octave::execution_exception&, const char *fmt, ...);
439 
440 OCTAVE_NORETURN
441 extern OCTINTERP_API void
442 verror_with_cfn (const char *fmt, va_list args);
443 
444 OCTAVE_FORMAT_PRINTF (1, 2)
445 OCTAVE_NORETURN
446 extern OCTINTERP_API void
447 error_with_cfn (const char *fmt, ...);
448 
449 OCTAVE_NORETURN
450 extern OCTINTERP_API void
451 vparse_error (const char *fmt, va_list args);
452 
453 OCTAVE_FORMAT_PRINTF (1, 2)
454 OCTAVE_NORETURN
455 extern OCTINTERP_API void
456 parse_error (const char *fmt, ...);
457 
458 OCTAVE_NORETURN
459 extern OCTINTERP_API void
460 vusage_with_id (const char *id, const char *fmt, va_list args);
461 
462 OCTAVE_FORMAT_PRINTF (2, 3)
463 OCTAVE_NORETURN
464 extern OCTINTERP_API void
465 usage_with_id (const char *id, const char *fmt, ...);
466 
467 extern OCTINTERP_API void
468 vwarning_with_id (const char *id, const char *fmt, va_list args);
469 
470 OCTAVE_FORMAT_PRINTF (2, 3)
471 extern OCTINTERP_API void
472 warning_with_id (const char *id, const char *fmt, ...);
473 
474 OCTAVE_NORETURN
475 extern OCTINTERP_API void
476 verror_with_id (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 (const char *id, const char *fmt, ...);
482 
483 OCTAVE_NORETURN
484 extern OCTINTERP_API void
485 verror_with_id_cfn (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 error_with_id_cfn (const char *id, const char *fmt, ...);
491 
492 OCTAVE_NORETURN
493 extern OCTINTERP_API void
494 vparse_error_with_id (const char *id, const char *fmt, va_list args);
495 
496 OCTAVE_FORMAT_PRINTF (2, 3)
497 OCTAVE_NORETURN
498 extern OCTINTERP_API void
499 parse_error_with_id (const char *id, const char *fmt, ...);
500 
501 OCTAVE_NORETURN
502 extern OCTINTERP_API void vpanic (const char *fmt, va_list args);
503 
504 OCTAVE_FORMAT_PRINTF (1, 2)
505 OCTAVE_NORETURN
506 extern OCTINTERP_API void panic (const char *fmt, ...);
507 
508 #define panic_impossible() \
509  panic ("impossible state reached in file '%s' at line %d", __FILE__, __LINE__)
510 
511 inline void
512 panic_if (bool cond)
513 {
514 #ifndef NDEBUG
515  if (cond)
516  panic_impossible ();
517  else
518  return;
519 
520 #else
521  octave_unused_parameter (cond);
522 #endif
523 }
524 
525 inline void
526 panic_unless (bool cond)
527 {
528  panic_if (! cond);
529 }
530 
531 #define error_impossible() \
532  error ("impossible state reached in file '%s' at line %d", __FILE__, __LINE__)
533 
534 inline void
535 error_if (bool cond)
536 {
537 #ifndef NDEBUG
538  if (cond)
539  error_impossible ();
540  else
541  return;
542 
543 #else
544  octave_unused_parameter (cond);
545 #endif
546 }
547 
548 inline void
549 error_unless (bool cond)
550 {
551  error_if (! cond);
552 }
553 
555 
556 //! Helper function for print_usage defined in defun.cc.
557 
558 extern OCTINTERP_API void defun_usage_message (const std::string& msg);
559 
560 // Convenience functions.
561 
562 extern OCTINTERP_API octave_value_list
563 set_warning_state (const std::string& id, const std::string& state);
564 
565 extern OCTINTERP_API octave_value_list
567 
568 extern OCTINTERP_API int warning_enabled (const std::string& id);
569 
570 extern OCTINTERP_API void disable_warning (const std::string& id);
571 
572 extern OCTINTERP_API void interpreter_try (octave::unwind_protect&);
573 
575 
576 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
577 OCTAVE_DEPRECATED (7, "use 'octave::defun_usage_message' instead")
578 inline void defun_usage_message (const std::string& msg)
579 {
581 }
582 
583 OCTAVE_DEPRECATED (7, "use 'octave::set_warning_state' instead")
584 inline octave_value_list
585 set_warning_state (const std::string& id, const std::string& state)
586 {
587  return octave::set_warning_state (id, state);
588 }
589 
590 OCTAVE_DEPRECATED (7, "use 'octave::set_warning_state' instead")
592 {
593  return octave::set_warning_state (args);
594 }
595 
596 OCTAVE_DEPRECATED (7, "use 'octave::warning_enabled' instead")
597 inline int warning_enabled (const std::string& id)
598 {
599  return octave::warning_enabled (id);
600 }
601 
602 OCTAVE_DEPRECATED (7, "use 'octave::disable_warning' instead")
603 inline void disable_warning (const std::string& id)
604 {
606 }
607 
608 OCTAVE_DEPRECATED (7, "use 'octave::interpreter_try' instead")
609 inline void interpreter_try (octave::unwind_protect& uwp)
610 {
612 }
613 
614 #endif
615 
616 #endif
OCTAVE_END_NAMESPACE(octave)
bool m_backtrace_on_warning
TRUE means that Octave will try to display a stack trace when a warning is encountered.
Definition: error.h:376
bool quiet_warning(void) const
Definition: error.h:166
OCTINTERP_API error_system(interpreter &interp)
Definition: error.cc:257
octave_map m_warning_options
A structure containing (most of) the current state of warnings.
Definition: error.h:387
OCTINTERP_API void initialize_default_warning_state(void)
Definition: error.cc:832
bool debug_on_error(bool flag)
Definition: error.h:64
bool m_discard_warning_messages
TRUE means warning messages are turned off.
Definition: error.h:368
void set_beep_on_error(bool flag)
Definition: error.h:122
std::string m_last_error_id
The last error message id.
Definition: error.h:399
bool backtrace_on_warning(void) const
Definition: error.h:138
OCTINTERP_API void interpreter_try(unwind_protect &frame)
Definition: error.cc:852
OCTINTERP_API void display_warning_options(std::ostream &os)
Definition: error.cc:723
std::string last_error_message(void) const
Definition: error.h:193
void set_last_warning_id(const std::string &val)
Definition: error.h:221
OCTINTERP_API 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_discard_warning_messages(bool flag)
Definition: error.h:102
static OCTINTERP_API 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:164
void set_last_warning_message(const std::string &val)
Definition: error.h:205
OCTAVE_NORETURN OCTINTERP_API void error_1(execution_exception &ee, const char *id, const char *fmt, va_list args)
Definition: error.cc:564
OCTAVE_NORETURN OCTINTERP_API void vpanic(const char *fmt, va_list args)
Definition: error.cc:626
std::string last_warning_id(const std::string &s)
Definition: error.h:226
std::string m_last_error_message
The text of the last error message.
Definition: error.h:390
OCTINTERP_API void set_warning_option(const std::string &state, const std::string &id)
Definition: error.cc:763
std::string last_warning_message(const std::string &s)
Definition: error.h:211
bool debug_on_caught(void) const
Definition: error.h:76
OCTAVE_NORETURN OCTINTERP_API void rethrow_error(const std::string &id, const std::string &msg, const octave_map &stack)
Definition: error.cc:597
OCTINTERP_API octave_scalar_map warning_query(const std::string &id_arg)
Definition: error.cc:644
octave_map warning_options(void) const
Definition: error.h:175
std::string last_error_id(const std::string &s)
Definition: error.h:240
std::string last_error_id(void) const
Definition: error.h:238
OCTAVE_NORETURN OCTINTERP_API 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:864
std::string last_warning_id(void) const
Definition: error.h:224
OCTINTERP_API 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:423
octave_map warning_options(const octave_map &new_val)
Definition: error.h:180
std::string m_last_warning_id
The last warning message id.
Definition: error.h:396
bool verbose_warning(bool flag)
Definition: error.h:154
octave_map last_error_stack(const octave_map &new_val)
Definition: error.h:254
static OCTINTERP_API octave_map make_stack_map(const std::list< frame_info > &frames)
Definition: error.cc:372
bool beep_on_error(void) const
Definition: error.h:124
bool discard_warning_messages(void) const
Definition: error.h:107
OCTAVE_NORETURN OCTINTERP_API void vusage(const char *id, const char *fmt, va_list args)
Definition: error.cc:495
bool backtrace_on_warning(bool flag)
Definition: error.h:140
bool debug_on_caught(bool flag)
Definition: error.h:78
bool m_debug_on_caught
TRUE means that Octave will try to enter the debugger when an error is encountered within the 'try' s...
Definition: error.h:359
error_system & operator=(const error_system &)=delete
bool m_debug_on_warning
TRUE means that Octave will try to enter the debugger when a warning is encountered.
Definition: error.h:364
OCTINTERP_API void display_exception(const execution_exception &ee, std::ostream &os) const
Definition: error.cc:905
void set_last_error_stack(const octave_map &val)
Definition: error.h:247
OCTINTERP_API void disable_warning(const std::string &id)
Definition: error.cc:827
~error_system(void)=default
OCTINTERP_API void vwarning(const char *name, const char *id, const char *fmt, va_list args)
Definition: error.cc:503
bool debug_on_warning(void) const
Definition: error.h:90
void set_debug_on_warning(bool flag)
Definition: error.h:88
octave_map m_last_error_stack
The last file in which an error occurred.
Definition: error.h:402
bool debug_on_error(void) const
Definition: error.h:62
error_system(const error_system &)=delete
void set_verbose_warning(bool flag)
Definition: error.h:150
OCTINTERP_API void save_exception(const execution_exception &ee)
Definition: error.cc:893
void set_last_error_id(const std::string &val)
Definition: error.h:236
bool discard_warning_messages(bool flag)
Definition: error.h:112
bool m_beep_on_error
TRUE means that Octave will try to beep obnoxiously before printing error messages.
Definition: error.h:372
void set_backtrace_on_warning(bool flag)
Definition: error.h:136
bool quiet_warning(bool flag)
Definition: error.h:168
bool beep_on_error(bool flag)
Definition: error.h:126
std::string last_warning_message(void) const
Definition: error.h:208
bool m_debug_on_error
TRUE means that Octave will try to enter the debugger when an error is encountered.
Definition: error.h:354
void set_debug_on_caught(bool flag)
Definition: error.h:74
interpreter & m_interpreter
Definition: error.h:348
bool m_quiet_warning
TRUE means that Octave will print no warnings, but lastwarn will be updated.
Definition: error.h:384
bool m_verbose_warning
TRUE means that Octave will print a verbose warning.
Definition: error.h:380
bool debug_on_warning(bool flag)
Definition: error.h:92
std::string last_error_message(const std::string &s)
Definition: error.h:195
octave_map last_error_stack(void) const
Definition: error.h:252
OCTINTERP_API std::string default_warning_state(void)
Definition: error.cc:700
void set_warning_options(const octave_map &val)
Definition: error.h:177
OCTAVE_NORETURN OCTINTERP_API void panic(const char *fmt,...)
Definition: error.cc:636
std::string m_last_warning_message
The text of the last warning message.
Definition: error.h:393
bool verbose_warning(void) const
Definition: error.h:152
void set_last_error_message(const std::string &val)
Definition: error.h:190
void set_debug_on_error(bool flag)
Definition: error.h:60
+namespace/ +namespace/private/ +namespace/
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
OCTAVE_NORETURN OCTINTERP_API void vparse_error_with_id(const char *id, const char *fmt, va_list args)
Definition: error.cc:1093
OCTINTERP_API void defun_usage_message(const std::string &msg)
Helper function for print_usage defined in defun.cc.
Definition: error.cc:1129
void panic_unless(bool cond)
Definition: error.h:526
OCTINTERP_API void warning(const char *fmt,...)
Definition: error.cc:1054
#define error_impossible()
Definition: error.h:531
OCTAVE_NORETURN OCTINTERP_API void usage_with_id(const char *id, const char *fmt,...)
Definition: error.cc:964
OCTAVE_NORETURN OCTINTERP_API void parse_error_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1099
OCTINTERP_API void vmessage(const char *name, const char *fmt, va_list args)
Definition: error.cc:933
void panic_if(bool cond)
Definition: error.h:512
OCTINTERP_API octave_value_list set_warning_state(const std::string &id, const std::string &state)
Definition: error.cc:1814
OCTINTERP_API void disable_warning(const std::string &id)
Definition: error.cc:1843
OCTINTERP_API void message(const char *name, const char *fmt,...)
Definition: error.cc:947
OCTAVE_NORETURN OCTINTERP_API void error_with_cfn(const char *fmt,...)
Definition: error.cc:1009
OCTAVE_NORETURN OCTINTERP_API void parse_error(const char *fmt,...)
Definition: error.cc:1084
OCTAVE_NORETURN OCTINTERP_API void error_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1024
void error_if(bool cond)
Definition: error.h:535
OCTAVE_NORETURN OCTINTERP_API void vparse_error(const char *fmt, va_list args)
Definition: error.cc:1078
OCTINTERP_API int warning_enabled(const std::string &id)
Definition: error.cc:1835
OCTAVE_NORETURN OCTINTERP_API void verror_with_id_cfn(const char *id, const char *fmt, va_list args)
Definition: error.cc:1033
OCTAVE_NORETURN OCTINTERP_API void verror_with_cfn(const char *fmt, va_list args)
Definition: error.cc:1003
OCTINTERP_API void interpreter_try(octave::unwind_protect &)
OCTAVE_NORETURN OCTINTERP_API void vusage_with_id(const char *id, const char *fmt, va_list args)
Definition: error.cc:956
OCTINTERP_API void warning_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1069
OCTAVE_NORETURN OCTINTERP_API void error(const char *fmt,...)
Definition: error.cc:979
OCTAVE_NORETURN OCTINTERP_API void error_with_id_cfn(const char *id, const char *fmt,...)
Definition: error.cc:1039
OCTINTERP_API void vwarning_with_id(const char *id, const char *fmt, va_list args)
Definition: error.cc:1063
#define panic_impossible()
Definition: error.h:508
void error_unless(bool cond)
Definition: error.h:549
OCTAVE_NORETURN OCTINTERP_API void verror_with_id(const char *id, const char *fmt, va_list args)
Definition: error.cc:1018
static uint32_t state[624]
Definition: randmtzig.cc:193