Mercurial > hg > octave-nkf
diff src/error.cc @ 7880:7609a985a052
verror fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 11 Jun 2008 13:58:03 -0400 |
parents | 59031cfe331b |
children | 4816cec8b1ca |
line wrap: on
line diff
--- 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 {