# HG changeset patch # User John W. Eaton # Date 1448892958 18000 # Node ID 29861f5f28c5d23acd8b300108099823a53ad678 # Parent 38968777601b4c2512afee3671268f095cd8a696 avoid defined but not used warning in error.cc * error.cc (debug_or_throw_exception (bool)): Delete. (usage_1 (const char *, const char *, va_list)): Create octave_execution_exception object and call usage_1 (const octave_execution_exception&, const char *, const char *, va_list). diff -r 38968777601b -r 29861f5f28c5 libinterp/corefcn/error.cc --- a/libinterp/corefcn/error.cc Sun Nov 29 19:58:52 2015 +1100 +++ b/libinterp/corefcn/error.cc Mon Nov 30 09:15:58 2015 -0500 @@ -306,22 +306,6 @@ throw e; } -static void -debug_or_throw_exception (bool show_stack_trace = false) -{ - octave_execution_exception e; - - if (show_stack_trace && octave_exception_state != octave_exec_exception) - { - std::ostringstream buf; - pr_where (buf, "error"); - - e.set_stack_trace (buf.str ()); - } - - debug_or_throw_exception (e, show_stack_trace); -} - // Warning messages are never buffered. static void @@ -402,9 +386,9 @@ static void usage_1 (const char *id, const char *fmt, va_list args) { - verror (true, std::cerr, "usage", id, fmt, args); + octave_execution_exception e; - debug_or_throw_exception (); + usage_1 (e, id, fmt, args); } void