Mercurial > hg > octave-nkf
changeset 16851:209f0db3c32b
mexErrMsgTxt should abort when called with an empty string (bug #39343).
* libinterp/interp-core/mex.cc(mexErrMsgTxt, mexErrMsgIdAndTxt): For an
empty string input, call Octave's error routine with a SPACE (" ") as
input.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 25 Jun 2013 18:43:58 -0700 |
parents | ec2ac2300ac8 |
children | 0133f1634687 |
files | libinterp/interp-core/mex.cc |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/interp-core/mex.cc +++ b/libinterp/interp-core/mex.cc @@ -3101,8 +3101,11 @@ if (s && strlen (s) > 0) error ("%s: %s", mexFunctionName (), s); else - // Just set the error state; don't print msg. - error (""); + { + // For compatibility with Matlab, print an empty message. + // Octave's error routine requires a non-null input so use a SPACE. + error (" "); + } mex_context->abort (); } @@ -3122,8 +3125,11 @@ va_end (args); } else - // Just set the error state; don't print msg. - error (""); + { + // For compatibility with Matlab, print an empty message. + // Octave's error routine requires a non-null input so use a SPACE. + error (" "); + } mex_context->abort (); }