#include "error.h"
Public Member Functions | |
error_system (interpreter &interp) | |
~error_system ()=default | |
bool | backtrace_on_warning () const |
bool | backtrace_on_warning (bool flag) |
octave_value | backtrace_on_warning (const octave_value_list &args, int nargout) |
bool | beep_on_error () const |
bool | beep_on_error (bool flag) |
octave_value | beep_on_error (const octave_value_list &args, int nargout) |
bool | debug_on_caught () const |
bool | debug_on_caught (bool flag) |
octave_value | debug_on_caught (const octave_value_list &args, int nargout) |
bool | debug_on_error () const |
bool | debug_on_error (bool flag) |
octave_value | debug_on_error (const octave_value_list &args, int nargout) |
bool | debug_on_warning () const |
bool | debug_on_warning (bool flag) |
octave_value | debug_on_warning (const octave_value_list &args, int nargout) |
std::string | default_warning_state () |
void | disable_warning (const std::string &id) |
bool | discard_warning_messages () const |
bool | discard_warning_messages (bool flag) |
octave_value | discard_warning_messages (const octave_value_list &args, int nargout) |
void | display_exception (const execution_exception &ee) const |
void | display_warning_options (std::ostream &os) |
OCTAVE_NORETURN void | error_1 (const char *id, const char *fmt, va_list args) |
OCTAVE_NORETURN void | error_1 (execution_exception &ee, const char *id, const char *fmt, va_list args) |
void | initialize_default_warning_state () |
void | interpreter_try (unwind_protect &frame) |
std::string | last_error_id () const |
octave_value | last_error_id (const octave_value_list &args, int nargout) |
std::string | last_error_id (const std::string &s) |
std::string | last_error_message () const |
octave_value | last_error_message (const octave_value_list &args, int nargout) |
std::string | last_error_message (const std::string &s) |
octave_map | last_error_stack () const |
octave_map | last_error_stack (const octave_map &new_val) |
std::string | last_warning_id () const |
octave_value | last_warning_id (const octave_value_list &args, int nargout) |
std::string | last_warning_id (const std::string &s) |
std::string | last_warning_message () const |
octave_value | last_warning_message (const octave_value_list &args, int nargout) |
std::string | last_warning_message (const std::string &s) |
OCTAVE_NORETURN void | panic (const char *fmt,...) |
bool | quiet_warning () const |
bool | quiet_warning (bool flag) |
octave_value | quiet_warning (const octave_value_list &args, int nargout) |
OCTAVE_NORETURN void | rethrow_error (const std::string &id, const std::string &msg, const octave_map &stack) |
void | save_exception (const execution_exception &ee) |
void | set_backtrace_on_warning (bool flag) |
void | set_beep_on_error (bool flag) |
void | set_debug_on_caught (bool flag) |
void | set_debug_on_error (bool flag) |
void | set_debug_on_warning (bool flag) |
void | set_discard_warning_messages (bool flag) |
void | set_last_error_id (const std::string &val) |
void | set_last_error_message (const std::string &val) |
void | set_last_error_stack (const octave_map &val) |
void | set_last_warning_id (const std::string &val) |
void | set_last_warning_message (const std::string &val) |
void | set_quiet_warning (bool flag) |
void | set_verbose_warning (bool flag) |
void | set_warning_option (const std::string &state, const std::string &id) |
void | set_warning_options (const octave_map &val) |
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 >()) |
OCTAVE_NORETURN void | throw_error (execution_exception &ee) |
bool | verbose_warning () const |
bool | verbose_warning (bool flag) |
octave_value | verbose_warning (const octave_value_list &args, int nargout) |
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) |
OCTAVE_NORETURN void | vpanic (const char *fmt, va_list args) |
OCTAVE_NORETURN void | vusage (const char *id, const char *fmt, va_list args) |
void | vwarning (const char *id, const char *fmt, va_list args) |
void | vwarning (const char *name, const char *id, const char *fmt, va_list args) |
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 be an error instead of a warning. | |
octave_map | warning_options () const |
octave_map | warning_options (const octave_map &new_val) |
octave_scalar_map | warning_query (const std::string &id_arg) |
Static Public Member Functions | |
static std::list< frame_info > | make_stack_frame_list (const octave_map &stack) |
static octave_map | make_stack_map (const std::list< frame_info > &frames) |
error_system::error_system | ( | interpreter & | interp | ) |
Definition at line 257 of file error.cc.
References initialize_default_warning_state().
|
default |
|
inline |
Definition at line 140 of file error.h.
Referenced by vwarning().
octave_value error_system::backtrace_on_warning | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 314 of file error.cc.
References set_internal_variable().
Referenced by Fwarning().
octave_value error_system::beep_on_error | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 307 of file error.cc.
References set_internal_variable().
Referenced by Fbeep_on_error().
octave_value error_system::debug_on_caught | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 285 of file error.cc.
References set_internal_variable().
Referenced by bp_table::dbclear_all_signals(), bp_table::dbstop_process_map_args(), bp_table::stop_on_err_warn_status(), and tree_evaluator::visit_statement().
octave_value error_system::debug_on_error | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 278 of file error.cc.
References set_internal_variable().
Referenced by bp_table::dbclear_all_signals(), bp_table::dbstop_process_map_args(), tree_evaluator::enter_debugger(), Fdebug_on_error(), bp_table::stop_on_err_warn_status(), and tree_evaluator::visit_statement().
|
inline |
Definition at line 92 of file error.h.
Referenced by vwarning().
octave_value error_system::debug_on_warning | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 292 of file error.cc.
References set_internal_variable().
Referenced by bp_table::dbclear_all_signals(), bp_table::dbstop_process_map_args(), tree_evaluator::enter_debugger(), Fdebug_on_warning(), Fwarning(), and bp_table::stop_on_err_warn_status().
std::string error_system::default_warning_state | ( | ) |
Definition at line 726 of file error.cc.
References octave_map::contents(), Array< T, Alloc >::numel(), and warning_options().
Referenced by display_warning_options(), and set_warning_option().
void error_system::disable_warning | ( | const std::string & | id | ) |
Definition at line 856 of file error.cc.
References set_warning_option().
Referenced by disable_warning(), and initialize_default_warning_state().
|
inline |
Definition at line 109 of file error.h.
Referenced by vwarning().
octave_value error_system::discard_warning_messages | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 299 of file error.cc.
References set_internal_variable().
Referenced by base_parser::finish_array_list(), and base_parser::make_colon_expression().
void error_system::display_exception | ( | const execution_exception & | ee | ) | const |
Definition at line 939 of file error.cc.
References event_manager::display_exception(), interpreter::get_event_manager(), and octave_diary.
Referenced by tree_evaluator::get_line_and_eval(), interpreter::handle_exception(), tree_evaluator::repl(), tree_evaluator::server_loop(), and tree_evaluator::visit_statement().
void error_system::display_warning_options | ( | std::ostream & | os | ) |
Definition at line 750 of file error.cc.
References octave_map::contents(), default_warning_state(), error(), Array< T, Alloc >::numel(), and warning_options().
Referenced by Fwarning().
void error_system::error_1 | ( | const char * | id, |
const char * | fmt, | ||
va_list | args | ||
) |
Definition at line 594 of file error.cc.
References message(), and throw_error().
void error_system::error_1 | ( | execution_exception & | ee, |
const char * | id, | ||
const char * | fmt, | ||
va_list | args | ||
) |
void error_system::initialize_default_warning_state | ( | ) |
Definition at line 862 of file error.cc.
References disable_warning(), and warning_options().
Referenced by error_system().
void error_system::interpreter_try | ( | unwind_protect & | frame | ) |
Definition at line 883 of file error.cc.
References action_container::protect_var().
Referenced by interpreter_try().
|
inline |
Definition at line 240 of file error.h.
Referenced by save_exception().
octave_value error_system::last_error_id | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 358 of file error.cc.
References set_internal_variable().
Referenced by Flasterr(), Flasterror(), tree_evaluator::visit_statement(), and tree_evaluator::visit_try_catch_command().
|
inline |
|
inline |
Definition at line 195 of file error.h.
Referenced by save_exception().
octave_value error_system::last_error_message | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 336 of file error.cc.
References set_internal_variable().
Referenced by Flasterr(), Flasterror(), and tree_evaluator::visit_try_catch_command().
|
inline |
|
inline |
Definition at line 254 of file error.h.
Referenced by Flasterror(), save_exception(), and tree_evaluator::visit_try_catch_command().
|
inline |
|
inline |
Definition at line 226 of file error.h.
Referenced by vwarning(), and warning_query().
octave_value error_system::last_warning_id | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 351 of file error.cc.
References set_internal_variable().
Referenced by Flastwarn(), and Fwarning().
|
inline |
|
inline |
Definition at line 210 of file error.h.
Referenced by vwarning().
octave_value error_system::last_warning_message | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 343 of file error.cc.
References set_internal_variable().
Referenced by base_parser::finish_array_list(), Flastwarn(), Fwarning(), and base_parser::make_colon_expression().
|
inline |
|
static |
Definition at line 399 of file error.cc.
References octave_map::contents(), and Array< T, Alloc >::numel().
Referenced by Ferror(), and rethrow_error().
|
static |
Definition at line 372 of file error.cc.
References Cell::column(), and octave_map::contents().
Referenced by save_exception().
void error_system::panic | ( | const char * | fmt, |
... | |||
) |
|
inline |
Definition at line 168 of file error.h.
Referenced by vwarning().
octave_value error_system::quiet_warning | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 329 of file error.cc.
References set_internal_variable().
Referenced by Fwarning().
void error_system::rethrow_error | ( | const std::string & | id, |
const std::string & | msg, | ||
const octave_map & | stack | ||
) |
Definition at line 616 of file error.cc.
References octave_map::contains(), error(), octave_map::isempty(), make_stack_frame_list(), octave_map::setfield(), and throw_error().
Referenced by Frethrow().
void error_system::save_exception | ( | const execution_exception & | ee | ) |
Definition at line 927 of file error.cc.
References last_error_id(), last_error_message(), last_error_stack(), make_stack_map(), and message().
Referenced by tree_evaluator::do_unwind_protect_cleanup_code(), tree_evaluator::eval(), tree_evaluator::evalin(), tree_evaluator::get_line_and_eval(), interpreter::handle_exception(), tree_evaluator::repl(), tree_evaluator::server_loop(), tree_evaluator::visit_statement(), tree_evaluator::visit_try_catch_command(), and tree_evaluator::visit_unwind_protect_command().
|
inline |
|
inline |
Definition at line 62 of file error.h.
Referenced by tree_evaluator::enter_debugger().
|
inline |
Definition at line 90 of file error.h.
Referenced by tree_evaluator::enter_debugger().
|
inline |
Definition at line 104 of file error.h.
Referenced by base_parser::finish_array_list(), and base_parser::make_colon_expression().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 207 of file error.h.
Referenced by base_parser::finish_array_list(), and base_parser::make_colon_expression().
void error_system::set_warning_option | ( | const std::string & | state, |
const std::string & | id | ||
) |
Definition at line 791 of file error.cc.
References octave_map::assign(), octave_map::clear(), octave_map::contents(), default_warning_state(), error(), Array< T, Alloc >::numel(), Array< T, Alloc >::resize(), and warning_options().
Referenced by disable_warning(), and Fwarning().
|
inline |
void error_system::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 at line 896 of file error.cc.
References tree_evaluator::backtrace_info(), interpreter::get_evaluator(), message(), and throw_error().
Referenced by error_1(), error_1(), Ferror(), rethrow_error(), throw_error(), and vusage().
void error_system::throw_error | ( | execution_exception & | ee | ) |
octave_value error_system::verbose_warning | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 322 of file error.cc.
References set_internal_variable().
Referenced by Fwarning().
void error_system::verror | ( | bool | save_last_error, |
std::ostream & | os, | ||
const char * | name, | ||
const char * | id, | ||
const char * | fmt, | ||
va_list | args, | ||
bool | with_cfn = false |
||
) |
Referenced by vpanic().
void error_system::vpanic | ( | const char * | fmt, |
va_list | args | ||
) |
void error_system::vusage | ( | const char * | id, |
const char * | fmt, | ||
va_list | args | ||
) |
Definition at line 497 of file error.cc.
References message(), and throw_error().
void error_system::vwarning | ( | const char * | id, |
const char * | fmt, | ||
va_list | args | ||
) |
Definition at line 605 of file error.cc.
References vwarning().
void error_system::vwarning | ( | const char * | name, |
const char * | id, | ||
const char * | fmt, | ||
va_list | args | ||
) |
Definition at line 506 of file error.cc.
References tree_evaluator::backtrace_message(), backtrace_on_warning(), bp_table::debug_on_warn(), debug_on_warning(), discard_warning_messages(), tree_evaluator::enter_debugger(), error_1(), flush_stdout(), application::forced_interactive(), tree_evaluator::get_bp_table(), interpreter::get_evaluator(), tree_evaluator::in_user_code(), interpreter::interactive(), last_warning_id(), last_warning_message(), octave_diary, quiet_warning(), strlen(), and warning_enabled().
Referenced by vwarning().
int error_system::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 be an error instead of a warning.
Definition at line 424 of file error.cc.
References octave_map::contents(), octave_map::numel(), octave_value::string_value(), and warning_options().
Referenced by vwarning(), and warning_enabled().
|
inline |
Definition at line 177 of file error.h.
Referenced by default_warning_state(), display_warning_options(), Fwarning(), initialize_default_warning_state(), set_warning_option(), warning_enabled(), and warning_query().
|
inline |
octave_scalar_map error_system::warning_query | ( | const std::string & | id_arg | ) |
Definition at line 669 of file error.cc.
References octave_scalar_map::assign(), octave_map::contents(), last_warning_id(), Array< T, Alloc >::numel(), panic_if, panic_unless, and warning_options().
Referenced by Fwarning().