Mercurial > hg > octave-lyh
diff scripts/testfun/test.m @ 12687:6d4c18565de1
Deprecate error_text(), __error_text__()
* __error_text__.m, error_text.m: New functions added to deprecated/ directory
to issue warning message.
* NEWS: Add functions to list of deprecated functions in 3.6.
* mk_undocumented_list: Remove error_text from alias list.
* demo.m, test.m: Replace __error_text__ with lasterr
* error.cc: Remove DEFALIAS of functions to lasterr.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 25 May 2011 14:09:00 -0700 |
parents | 55430618bd5f |
children | 63463570d9fe |
line wrap: on
line diff
--- a/scripts/testfun/test.m +++ b/scripts/testfun/test.m @@ -286,7 +286,7 @@ input ("Press <enter> to continue: ", "s"); catch __success = 0; - __msg = sprintf ("%sdemo failed\n%s", __signal_fail, __error_text__); + __msg = sprintf ("%sdemo failed\n%s", __signal_fail, lasterr ()); end_try_catch clear __test__; @@ -359,7 +359,7 @@ catch __success = 0; __msg = sprintf ("%stest failed: syntax error\n%s", - __signal_fail, __error_text__); + __signal_fail, lasterr ()); end_try_catch endif __code = ""; @@ -389,7 +389,7 @@ catch __success = 0; __msg = sprintf ("%stest failed: syntax error\n%s", - __signal_fail, __error_text__); + __signal_fail, lasterr ()); end_try_catch if (__success) @@ -488,13 +488,13 @@ eval (sprintf ("%s__test__(%s);", __shared_r, __shared)); catch if (strcmp (__type, "xtest")) - __msg = sprintf ("%sknown failure\n%s", __signal_fail, __error_text__); + __msg = sprintf ("%sknown failure\n%s", __signal_fail, lasterr ()); __xfail++; else - __msg = sprintf ("%stest failed\n%s", __signal_fail, __error_text__); + __msg = sprintf ("%stest failed\n%s", __signal_fail, lasterr ()); __success = 0; endif - if (isempty (__error_text__)) + if (isempty (lasterr ())) error ("empty error text, probably Ctrl-C --- aborting"); endif end_try_catch