<< getLastReport error manager lastwarn >>

lasterror


Returns last recorded error message.


Syntax


last_err = lasterror()
lasterror('reset')
lasterror(error_struct)

Output argument


last_err

error message structure.

Description


l = lasterror() returns a structure containing the last error message and information as an struct.

lasterror('reset') clears last error.

lasterror(error_struct) set last error.

Examples


state = execstr('xxxxxx', 'errcatch')
if ~state
  l = lasterror()
end

state = execstr('xxxxxx', 'errcatch')
l = lasterror();
lasterror('reset');
lasterror()
lasterror(l);
lasterror()

See also


error, warning.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< getLastReport error manager lastwarn >>