Mercurial > hg > octave-lyh
diff src/error.cc @ 4731:176fcf62c464
[project @ 2004-02-02 20:27:15 by jwe]
author | jwe |
---|---|
date | Mon, 02 Feb 2004 20:27:15 +0000 |
parents | 9759e52e19bc |
children | b484cdca27be |
line wrap: on
line diff
--- 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 (); }