Why does the CLF function clear the error message identifier?
6 views (last 30 days)
Show older comments
The CLF function clears the error message identifier returned by the LASTERR and LASTERROR functions.
ErrorState.message='error message';
ErrorState.identifier='error:identifier';
lasterror(ErrorState);
[msg,id] = lasterr
msg =
error message
id =
error:identifier
lasterror
ans =
message: 'error message'
identifier: 'error:identifier'
clf
[msg,id] = lasterr
msg =
error message
id =
lasterror
ans =
message: 'error message'
identifier: ''
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in MATLAB 7.0 (R14), in that the CLF function will remove the error message identifier.
CLF calls GETAPPDATA which saves and restores the error message from LASTERR. To save the message id, replace LASTERR with LASTERROR, on lines 25 and 30 of getappdata.m:
On line 25:
la = lasterror;
On line 30:
lasterror(la);
0 Comments
More Answers (0)
See Also
Categories
Find more on Platform and License in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!