Query or set the last error message structure.
When called without arguments, return a structure containing the last error message and other information related to this error. The elements of the structure are:
message
The text of the last error message
identifier
The message identifier of this error message
stack
A structure containing information on where the message occurred. This may be an empty structure if the information cannot be obtained. The fields of the structure are:
file
The name of the file where the error occurred
name
The name of function in which the error occurred
line
The line number at which the error occurred
column
An optional field with the column number at which the error occurred
The last error structure may be set by passing a scalar structure, err, as input. Any fields of err that match those above are set while any unspecified fields are initialized with default values.
If lasterror
is called with the argument "reset"
, all
fields are set to their default values.
See also: lasterr, error, lastwarn.
Package: octave