Mercurial > octave
diff libinterp/corefcn/call-stack.cc @ 22253:dbf7fd79e391
More informative messages for errors in anonymous functions (bug #46136).
* ov-usr-fcn.cc (octave_user_function::do_multi_index_op ()): If tree evaluator
is bypassed for (is_special_expr ()), set location here.
* call-stack.cc (octave_call_stack::stack_frame::fcn_name ()): Append
octave_fcn_handle::anonymous to function name for anonymous functions.
author | Olaf Till <olaf.till@uni-jena.de> |
---|---|
date | Tue, 06 Oct 2015 12:12:56 +0200 |
parents | 0f6fc2ec3b1a |
children | bac0d6f07a3e |
line wrap: on
line diff
--- a/libinterp/corefcn/call-stack.cc Wed Aug 10 10:28:00 2016 +0200 +++ b/libinterp/corefcn/call-stack.cc Tue Oct 06 12:12:56 2015 +0200 @@ -30,6 +30,7 @@ #include "oct-map.h" #include "ov.h" #include "ov-fcn.h" +#include "ov-fcn-handle.h" #include "ov-usr-fcn.h" octave_call_stack *octave_call_stack::instance = 0; @@ -52,7 +53,10 @@ if (print_subfn && ! parent_fcn_name.empty ()) retval = parent_fcn_name + Vfilemarker; - retval += m_fcn->name (); + if (m_fcn->is_anonymous_function ()) + retval += octave_fcn_handle::anonymous; + else + retval += m_fcn->name (); } else retval = "<unknown>";