MESSAGE function and error handling
6 views (last 30 days)
Show older comments
I just stumbled across the MESSAGE function which takes a message identifier of the form
foo:bar:id
and creates an object that can be used with ERROR and WARNING that has the same id and the corresponding error/warning message. This seems like it could provide an easy way of making the error handling in my code more consistent with TMW error handling. To do this I would need a list of the standard message ids.
Is there a documented list of all the error message ids someplace?
0 Comments
Answers (2)
Walter Roberson
on 16 Feb 2018
There is no documented list. To see what exists, see my discussion at https://www.mathworks.com/matlabcentral/answers/373512-how-can-i-open-message-key-catalog#answer_296850
0 Comments
Aditya Hegde
on 16 Feb 2018
Hi,
Use the lasterror command to see the error id. For example if you are using strrep and it throws an error, you can then use the lasterror command to check the error id. Hope this helps.
0 Comments
See Also
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!