Mercurial > hg > octave-jordi
changeset 4731:176fcf62c464
[project @ 2004-02-02 20:27:15 by jwe]
author | jwe |
---|---|
date | Mon, 02 Feb 2004 20:27:15 +0000 |
parents | c88afb778c41 |
children | b484cdca27be |
files | src/ChangeLog src/error.cc |
diffstat | 2 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2004-02-02 John W. Eaton <jwe@bevo.che.wisc.edu> + * error.cc (verror): New arg, save_last_error. Change all callers. + (usage): Set error_state after calling verror. + * oct-map.cc (Octave_map::assign (const std::string, const Cell&)): Set dimensions to RHS dimensions, not 1x1.
--- a/src/error.cc +++ b/src/error.cc @@ -154,7 +154,7 @@ } static void -verror (const char *name, const char *fmt, va_list args) +verror (bool save_last_error, const char *name, const char *fmt, va_list args) { if (discard_error_messages) return; @@ -184,7 +184,7 @@ OSSTREAM_FREEZE (output_buf); - if (! error_state && name && ! strcmp (name, "error")) + if (! error_state && save_last_error) { // This is the first error in a possible series. Vlast_error_message = msg_string; @@ -240,14 +240,14 @@ { char *tmp_fmt = strsave (fmt); tmp_fmt[len - 1] = '\0'; - verror (name, tmp_fmt, args); + verror (true, name, tmp_fmt, args); delete [] tmp_fmt; } error_state = -2; } else - verror (name, fmt, args); + verror (true, name, fmt, args); } } else @@ -263,7 +263,7 @@ { va_list args; va_start (args, fmt); - verror (name, fmt, args); + verror (false, name, fmt, args); va_end (args); } @@ -272,8 +272,8 @@ { va_list args; va_start (args, fmt); + verror (true, "usage", fmt, args); error_state = -1; - verror ("usage", fmt, args); va_end (args); } @@ -291,12 +291,12 @@ { char *tmp_fmt = strsave (fmt); tmp_fmt[len - 1] = '\0'; - verror (0, tmp_fmt, args); + verror (false, 0, tmp_fmt, args); delete [] tmp_fmt; } } else - verror (0, fmt, args); + verror (false, 0, fmt, args); } } else @@ -433,7 +433,7 @@ va_start (args, fmt); buffer_error_messages = 0; discard_error_messages = false; - verror ("panic", fmt, args); + verror (false, "panic", fmt, args); va_end (args); abort (); }