Mercurial > hg > octave-lyh
diff src/toplev.h @ 8013:b3e667f1ab4c
call backtrace_error_message in eval functions, not when popping stack
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 06 Aug 2008 14:40:16 -0400 |
parents | 3100283874d7 |
children | eb63fbe60fab |
line wrap: on
line diff
--- a/src/toplev.h +++ b/src/toplev.h @@ -266,6 +266,12 @@ instance->do_clear (); } + static void backtrace_error_message (void) + { + if (instance_ok ()) + instance->do_backtrace_error_message (); + } + private: // The current call stack. @@ -380,9 +386,6 @@ { if (cs.size () > 1) { - if (error_state) - backtrace_error_message (); - const call_stack_elt& elt = cs.back (); curr_frame = elt.prev; cs.pop_back (); @@ -393,7 +396,7 @@ void do_clear (void) { cs.clear (); } - void backtrace_error_message (void) const; + void do_backtrace_error_message (void) const; }; #endif