User`s guide
R2011b
8-6
Compatibility Considerations
If you have scripts or functions that use message identifiers that changed, you must
update the code to use the new identifiers. Typically, message identifiers are used to turn
off specific warning messages, or in code that uses a try/catch statement and performs an
action based on a specific error identifier.
For example, the 'distcomp:old:ID' identifier has changed to
'parallel:similar:ID'. If your code checks for 'distcomp:old:ID', you must
update it to check for 'parallel:similar:ID' instead.
To determine the identifier for a warning, run the following command just after you see
the warning:
[MSG,MSGID] = lastwarn;
This command saves the message identifier to the variable MSGID.
To determine the identifier for an error, run the following commands just after you see
the error:
exception = MException.last;
MSGID = exception.identifier;
Tip Warning messages indicate a potential issue with your code. While you can turn off a
warning, a suggested alternative is to change your code so that it runs warning-free.
Task Error Properties Updated
If there is an error during task execution, the task Error property now contains the non-
empty MException object that is thrown. If there was no error during task execution,
the Error property is empty.
The identifier and message properties of this object are now the same as the task’s
ErrorIdentifier and ErrorMessage properties, respectively. For more information
about these properties, see the Error, ErrorIdentifier, and ErrorMessage reference pages.