Why does the CLF function clear the error message identifier?

6 visualizaciones (últimos 30 días)
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: ''

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 27 de Jun. de 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);

Más respuestas (0)

Categorías

Más información sobre Platform and License en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by