26 #if ! defined (octave_error_h)
27 #define octave_error_h 1
29 #include "octave-config.h"
264 static OCTINTERP_API std::list<frame_info>
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);
279 vwarning (
const char *name,
const char *
id,
const char *fmt,
288 OCTINTERP_API
void error_1 (
const char *
id,
const char *fmt, va_list args);
291 OCTINTERP_API
void vusage (
const char *
id,
const char *fmt, va_list args);
293 OCTINTERP_API
void vwarning (
const char *
id,
const char *fmt, va_list args);
297 rethrow_error (
const std::string&
id,
const std::string& msg,
301 OCTINTERP_API
void vpanic (
const char *fmt, va_list args);
304 OCTINTERP_API
void panic (
const char *fmt, ...);
327 const std::string&
id,
329 const std::list<frame_info>& stack_info
330 = std::list<frame_info> ());
339 OCTAVE_DEPRECATED (7,
"second argument is no longer accepted")
413 extern OCTINTERP_API
void
414 vmessage (const
char *name, const
char *fmt, va_list args);
416 OCTAVE_FORMAT_PRINTF (2, 3)
417 extern OCTINTERP_API
void message (const
char *name, const
char *fmt, ...);
419 extern OCTINTERP_API
void vwarning (const
char *fmt, va_list args);
421 OCTAVE_FORMAT_PRINTF (1, 2)
422 extern OCTINTERP_API
void warning (const
char *fmt, ...);
425 extern OCTINTERP_API
void verror (const
char *fmt, va_list args);
427 OCTAVE_FORMAT_PRINTF (1, 2)
429 extern OCTINTERP_API
void error (const
char *fmt, ...);
432 extern OCTINTERP_API
void
435 OCTAVE_FORMAT_PRINTF (2, 3)
437 extern OCTINTERP_API
void
441 extern OCTINTERP_API
void
444 OCTAVE_FORMAT_PRINTF (1, 2)
446 extern OCTINTERP_API
void
450 extern OCTINTERP_API
void
453 OCTAVE_FORMAT_PRINTF (1, 2)
455 extern OCTINTERP_API
void
459 extern OCTINTERP_API
void
462 OCTAVE_FORMAT_PRINTF (2, 3)
464 extern OCTINTERP_API
void
467 extern OCTINTERP_API
void
470 OCTAVE_FORMAT_PRINTF (2, 3)
471 extern OCTINTERP_API
void
475 extern OCTINTERP_API
void
478 OCTAVE_FORMAT_PRINTF (2, 3)
480 extern OCTINTERP_API
void
484 extern OCTINTERP_API
void
487 OCTAVE_FORMAT_PRINTF (2, 3)
489 extern OCTINTERP_API
void
493 extern OCTINTERP_API
void
496 OCTAVE_FORMAT_PRINTF (2, 3)
498 extern OCTINTERP_API
void
502 extern OCTINTERP_API
void vpanic (const
char *fmt, va_list args);
504 OCTAVE_FORMAT_PRINTF (1, 2)
506 extern OCTINTERP_API
void panic (const
char *fmt, ...);
508 #define panic_impossible() \
509 panic ("impossible state reached in file '%s' at line %d", __FILE__, __LINE__)
521 octave_unused_parameter (cond);
531 #define error_impossible() \
532 error ("impossible state reached in file '%s' at line %d", __FILE__, __LINE__)
544 octave_unused_parameter (cond);
576 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
577 OCTAVE_DEPRECATED (7,
"use 'octave::defun_usage_message' instead")
583 OCTAVE_DEPRECATED (7,
"use 'octave::set_warning_state' instead")
590 OCTAVE_DEPRECATED (7,
"use 'octave::set_warning_state' instead")
596 OCTAVE_DEPRECATED (7,
"use 'octave::warning_enabled' instead")
602 OCTAVE_DEPRECATED (7,
"use 'octave::disable_warning' instead")
608 OCTAVE_DEPRECATED (7,
"use 'octave::interpreter_try' instead")
bool m_backtrace_on_warning
TRUE means that Octave will try to display a stack trace when a warning is encountered.
bool quiet_warning(void) const
OCTINTERP_API error_system(interpreter &interp)
octave_map m_warning_options
A structure containing (most of) the current state of warnings.
OCTINTERP_API void initialize_default_warning_state(void)
bool debug_on_error(bool flag)
bool m_discard_warning_messages
TRUE means warning messages are turned off.
void set_beep_on_error(bool flag)
std::string m_last_error_id
The last error message id.
bool backtrace_on_warning(void) const
OCTINTERP_API void interpreter_try(unwind_protect &frame)
OCTINTERP_API void display_warning_options(std::ostream &os)
std::string last_error_message(void) const
void set_last_warning_id(const std::string &val)
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)
static OCTINTERP_API std::list< frame_info > make_stack_frame_list(const octave_map &stack)
void set_quiet_warning(bool flag)
void set_last_warning_message(const std::string &val)
OCTAVE_NORETURN OCTINTERP_API void error_1(execution_exception &ee, const char *id, const char *fmt, va_list args)
OCTAVE_NORETURN OCTINTERP_API void vpanic(const char *fmt, va_list args)
std::string last_warning_id(const std::string &s)
std::string m_last_error_message
The text of the last error message.
OCTINTERP_API void set_warning_option(const std::string &state, const std::string &id)
std::string last_warning_message(const std::string &s)
bool debug_on_caught(void) const
OCTAVE_NORETURN OCTINTERP_API void rethrow_error(const std::string &id, const std::string &msg, const octave_map &stack)
OCTINTERP_API octave_scalar_map warning_query(const std::string &id_arg)
octave_map warning_options(void) const
std::string last_error_id(const std::string &s)
std::string last_error_id(void) const
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 >())
std::string last_warning_id(void) const
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...
octave_map warning_options(const octave_map &new_val)
std::string m_last_warning_id
The last warning message id.
bool verbose_warning(bool flag)
octave_map last_error_stack(const octave_map &new_val)
static OCTINTERP_API octave_map make_stack_map(const std::list< frame_info > &frames)
bool beep_on_error(void) const
bool discard_warning_messages(void) const
OCTAVE_NORETURN OCTINTERP_API void vusage(const char *id, const char *fmt, va_list args)
bool backtrace_on_warning(bool flag)
bool debug_on_caught(bool flag)
bool m_debug_on_caught
TRUE means that Octave will try to enter the debugger when an error is encountered within the 'try' s...
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.
OCTINTERP_API void display_exception(const execution_exception &ee, std::ostream &os) const
void set_last_error_stack(const octave_map &val)
OCTINTERP_API void disable_warning(const std::string &id)
~error_system(void)=default
OCTINTERP_API void vwarning(const char *name, const char *id, const char *fmt, va_list args)
bool debug_on_warning(void) const
void set_debug_on_warning(bool flag)
octave_map m_last_error_stack
The last file in which an error occurred.
bool debug_on_error(void) const
error_system(const error_system &)=delete
void set_verbose_warning(bool flag)
OCTINTERP_API void save_exception(const execution_exception &ee)
void set_last_error_id(const std::string &val)
bool discard_warning_messages(bool flag)
bool m_beep_on_error
TRUE means that Octave will try to beep obnoxiously before printing error messages.
void set_backtrace_on_warning(bool flag)
bool quiet_warning(bool flag)
bool beep_on_error(bool flag)
std::string last_warning_message(void) const
bool m_debug_on_error
TRUE means that Octave will try to enter the debugger when an error is encountered.
void set_debug_on_caught(bool flag)
interpreter & m_interpreter
bool m_quiet_warning
TRUE means that Octave will print no warnings, but lastwarn will be updated.
bool m_verbose_warning
TRUE means that Octave will print a verbose warning.
bool debug_on_warning(bool flag)
std::string last_error_message(const std::string &s)
octave_map last_error_stack(void) const
OCTINTERP_API std::string default_warning_state(void)
void set_warning_options(const octave_map &val)
OCTAVE_NORETURN OCTINTERP_API void panic(const char *fmt,...)
std::string m_last_warning_message
The text of the last warning message.
bool verbose_warning(void) const
void set_last_error_message(const std::string &val)
void set_debug_on_error(bool flag)
+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)
OCTINTERP_API void defun_usage_message(const std::string &msg)
Helper function for print_usage defined in defun.cc.
void panic_unless(bool cond)
OCTINTERP_API void warning(const char *fmt,...)
#define error_impossible()
OCTAVE_NORETURN OCTINTERP_API void usage_with_id(const char *id, const char *fmt,...)
OCTAVE_NORETURN OCTINTERP_API void parse_error_with_id(const char *id, const char *fmt,...)
OCTINTERP_API void vmessage(const char *name, const char *fmt, va_list args)
OCTINTERP_API octave_value_list set_warning_state(const std::string &id, const std::string &state)
OCTINTERP_API void disable_warning(const std::string &id)
OCTINTERP_API void message(const char *name, const char *fmt,...)
OCTAVE_NORETURN OCTINTERP_API void error_with_cfn(const char *fmt,...)
OCTAVE_NORETURN OCTINTERP_API void parse_error(const char *fmt,...)
OCTAVE_NORETURN OCTINTERP_API void error_with_id(const char *id, const char *fmt,...)
OCTAVE_NORETURN OCTINTERP_API void vparse_error(const char *fmt, va_list args)
OCTINTERP_API int warning_enabled(const std::string &id)
OCTAVE_NORETURN OCTINTERP_API void verror_with_id_cfn(const char *id, const char *fmt, va_list args)
OCTAVE_NORETURN OCTINTERP_API void verror_with_cfn(const char *fmt, va_list args)
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)
OCTINTERP_API void warning_with_id(const char *id, const char *fmt,...)
OCTAVE_NORETURN OCTINTERP_API void error(const char *fmt,...)
OCTAVE_NORETURN OCTINTERP_API void error_with_id_cfn(const char *id, const char *fmt,...)
OCTINTERP_API void vwarning_with_id(const char *id, const char *fmt, va_list args)
#define panic_impossible()
void error_unless(bool cond)
OCTAVE_NORETURN OCTINTERP_API void verror_with_id(const char *id, const char *fmt, va_list args)
static uint32_t state[624]