Mercurial > hg > octave-lojdl
changeset 7880:7609a985a052
verror fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 11 Jun 2008 13:58:03 -0400 |
parents | a017ca5a2f75 |
children | f74669a09deb |
files | src/ChangeLog src/error.cc |
diffstat | 2 files changed, 8 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-06-11 John W. Eaton <jwe@octave.org> + + * error.cc (verror): Restore newline in msg_string. Stripping + "error: " prefix when buffering error messages is no longer neeed. + 2008-06-10 John W. Eaton <jwe@octave.org> * mexproto.h (mxCreateLogicalScalar): Declar arg as mxLogical, not int.
--- a/src/error.cc +++ b/src/error.cc @@ -220,7 +220,7 @@ if (name) msg_string += std::string (name) + ": "; - msg_string += base_msg; + msg_string += base_msg + "\n"; if (! error_state && save_last_error) { @@ -247,26 +247,10 @@ if (buffer_error_messages) { - std::string tmp = msg_string; - if (! error_message_buffer) - { - error_message_buffer = new std::ostringstream (); + error_message_buffer = new std::ostringstream (); - // FIXME -- this is ugly, but it prevents - // - // eval ("error (\"msg\")", "error (lasterr ())"); - // - // from printing `error: ' twice. Assumes that the NAME we - // have been given doesn't contain `:'. - - size_t pos = msg_string.find (':'); - - if (pos != NPOS && pos < Vlast_error_message.length () - 2) - tmp = msg_string.substr (pos+2); - } - - *error_message_buffer << tmp; + *error_message_buffer << msg_string; } else {