MException
Capture error information
Description
Any MATLAB® code that detects an error and throws an exception constructs an
MException
object. The MException
object contains retrievable
information about errors. MATLAB can throw either predefined exceptions or exceptions that you
construct.
Creation
Description
Input Arguments
Properties
Object Functions
throw | Throw exception |
MException.last | Return last uncaught exception |
rethrow | Rethrow previously caught exception |
throwAsCaller | Throw exception as if occurs within calling function |
addCause | Record additional causes of exception |
addCorrection | Provide suggested fix for exception |
getReport | Get error message for exception |
Examples
Extended Capabilities
Version History
Introduced in R2007b