Mercurial > octave
diff libinterp/corefcn/error.cc @ 29171:254ee9af5014
maint: More updates to standardize exception naming scheme.
* error.cc, error.h, errwarn.cc, errwarn.h, interpreter.cc, interpreter.h,
ov-complex.cc, pt-eval.cc, pt-eval.h:
Update naming conventions for exceptions to use initial letter of exception
type.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 10 Dec 2020 15:27:14 -0800 |
parents | 10a35049bad7 |
children | 7854d5752dd2 |
line wrap: on
line diff
--- a/libinterp/corefcn/error.cc Thu Dec 10 23:35:06 2020 +0100 +++ b/libinterp/corefcn/error.cc Thu Dec 10 15:27:14 2020 -0800 @@ -72,12 +72,12 @@ OCTAVE_NORETURN static void -error_1 (octave::execution_exception& e, const char *id, const char *fmt, +error_1 (octave::execution_exception& ee, const char *id, const char *fmt, va_list args) { octave::error_system& es = octave::__get_error_system__ ("error_1"); - es.error_1 (e, id, fmt, args); + es.error_1 (ee, id, fmt, args); } OCTAVE_NORETURN @@ -577,13 +577,13 @@ } } - void error_system::error_1 (execution_exception& e, const char *id, + void error_system::error_1 (execution_exception& ee, const char *id, const char *fmt, va_list args) { - e.set_identifier (id); - e.set_message (format_message (fmt, args)); + ee.set_identifier (id); + ee.set_message (format_message (fmt, args)); - throw_error (e); + throw_error (ee); } void error_system::error_1 (const char *id, const char *fmt, @@ -616,7 +616,7 @@ { std::list<frame_info> stack_info; - execution_exception e ("error", id, msg, stack_info); + execution_exception ee ("error", id, msg, stack_info); if (! stack.isempty () && ! (stack.contains ("file") && stack.contains ("name") @@ -624,9 +624,9 @@ error ("rethrow: STACK struct must contain the fields 'file', 'name', and 'line'"); if (! stack.isempty ()) - e.set_stack_info (make_stack_frame_list (stack)); + ee.set_stack_info (make_stack_frame_list (stack)); - throw_error (e); + throw_error (ee); } void error_system::vpanic (const char *fmt, va_list args) @@ -897,25 +897,25 @@ throw ex; } - void error_system::save_exception (const execution_exception& e) + void error_system::save_exception (const execution_exception& ee) { - last_error_id (e.identifier ()); - std::string message = e.message (); + last_error_id (ee.identifier ()); + std::string message = ee.message (); std::string xmsg = (message.size () > 0 && message.back () == '\n' ? message.substr (0, message.size () - 1) : message); last_error_message (xmsg); - last_error_stack (make_stack_map (e.stack_info ())); + last_error_stack (make_stack_map (ee.stack_info ())); } - void error_system::display_exception (const execution_exception& e, + void error_system::display_exception (const execution_exception& ee, std::ostream& os) const { if (m_beep_on_error) os << "\a"; - e.display (octave_diary); - e.display (os); + ee.display (octave_diary); + ee.display (os); } } @@ -975,17 +975,17 @@ } void -verror (octave::execution_exception& e, const char *fmt, va_list args) +verror (octave::execution_exception& ee, const char *fmt, va_list args) { - error_1 (e, "", fmt, args); + error_1 (ee, "", fmt, args); } void -error (octave::execution_exception& e, const char *fmt, ...) +error (octave::execution_exception& ee, const char *fmt, ...) { va_list args; va_start (args, fmt); - verror (e, fmt, args); + verror (ee, fmt, args); va_end (args); }