The cause and Correction fields are empty in this case. Each field is described in more
detail in the sections that follow.
Message Identifiers
A message identifier is a tag that you attach to an error or warning statement that makes
that error or warning uniquely recognizable by MATLAB. You can use message identifiers
with error reporting to better identify the source of an error, or with warnings to control
any selected subset of the warnings in your programs.
The message identifier is a read-only character vector that specifies a component and a
mnemonic label for an error or warning. The format of a simple identifier is
component:mnemonic
A colon separates the two parts of the identifier: component and mnemonic. If the
identifier uses more than one component, then additional colons are required to separate
them. A message identifier must always contain at least one colon.
Some examples of message identifiers are
MATLAB:rmpath:DirNotFound
MATLAB:odearguments:InconsistentDataType
Simulink:actionNotTaken
TechCorp:OpenFile:notFoundInPath
Both the component and mnemonic fields must adhere to the following syntax rules:
- No white space (space or tab characters) is allowed anywhere in the identifier.
- The first character must be alphabetic, either uppercase or lowercase.
- The remaining characters can be alphanumeric or an underscore.
There is no length limitation to either the component or mnemonic. The identifier can
also be an empty character vector.
Component Field
The component field specifies a broad category under which various errors and warnings
can be generated. Common components are a particular product or toolbox name, such as
MATLAB or Control, or perhaps the name of your company, such as TechCorp in the
preceding example.
26 Error Handling