MException.last
Return last uncaught exception
Description
returns the contents of the most recently thrown, uncaught exception = MException.lastMException object.
MException.last is not set if a try/catch
statement catches the last exception. MException.last is a static
function.
MException.last('reset') clears the properties of
the exception returned from MException.last. It sets the
MException
identifier and message properties to an empty
character vector, the stack property to a 0-by-1 structure, and the
cause property to an empty cell array.
Examples
Tips
Use
MException.lastonly from the Command Window, not within a function.
Version History
Introduced in R2007b
See Also
try, catch | error | throw