Why does the CLF function clear the error message identifier?
6 次查看(过去 30 天)
显示 更早的评论
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: ''
采纳的回答
MathWorks Support Team
2009-6-27
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Platform and License 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!