Why is my code that includes Mapping Toolbox message identifiers not working?

2 views (last 30 days)
Warnings
I have code that uses
warning(off,)
to turn off a warning identifier. This used to work in earlier releases but does not work with Mapping Toolbox™ 3.4 (R2011b).
Errors
I have code that uses a try/catch statement and performs an action based on a specific error identifier. This used to work in earlier releases but does not work in Mapping Toolbox 3.4 (R2011b).

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 30 Aug 2011
Error and message identifiers have changed For Mapping Toolbox 3.4 (R2011b). If you use
warning(off,)
to turn off warning identifiers, replace warning message identifiers that changed with the new message identifiers, as shown in the attached document, to continue to suppress the warnings.
If you use a try/catch statement in your code, replace the old identifier with the new identifier.
See the table attached to this solution for a list of changed message identifiers.
To determine the identifier for a warning, run the following command just after the warning message appears:
[MSG,MSGID] = lastwarn;
This command saves the message identifier to the variable MSGID.
To determine the identifier for an error, run the following command just after the error message appears:
exception = MException.last;
MSGID = exception.identifier;
Note on warnings: Warning messages indicate a potential issue with your code and should not be ignored. While you can turn off a warning, a suggested alternative is to change your code so it runs warning-free.

More Answers (0)

Tags

No tags entered yet.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!