Mercurial > jwe > octave
changeset 24044:76d90f0c81af
Return correct calling function name in error message from who/whos (bug #52023).
* variables.cc (do_who): Use '%s' and my_name.c_str () to pass the name of the
calling function through in error message.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 14 Sep 2017 21:18:47 -0700 |
parents | f50ef29d874e |
children | a666e433aa21 |
files | libinterp/corefcn/variables.cc |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/variables.cc Thu Sep 14 09:02:07 2017 -0700 +++ b/libinterp/corefcn/variables.cc Thu Sep 14 21:18:47 2017 -0700 @@ -1641,7 +1641,8 @@ // implement this option there so that the variables are never // stored at all. if (i == argc - 1) - error ("whos: -file argument must be followed by a filename"); + error ("%s: -file argument must be followed by a filename", + my_name.c_str ()); std::string nm = argv[i + 1];