| MATLAB Function Reference | ![]() |
Syntax
Description
reissues the error specified by rethrow(err)
err. The currently running M-file terminates and control returns to the keyboard (or to any enclosing catch block). The err argument must be a MATLAB structure containing the following character array fields.
| Fieldname |
Description |
message |
Text of the error message |
identifier |
Message identifier of the error message |
See Message Identifiers in the MATLAB documentation for more information on the syntax and usage of message identifiers.
A convenient way to get a valid err structure for the last error issued is by using the lasterror function.
Examples
rethrow is usually used in conjunction with try-catch statements to reissue an error from a catch block after performing catch-related operations. For example:
See Also
error, lasterror, lasterr, try, catch, dbstop
| residue | return | ![]() |