Error messages are made up of the following parts:
Unique identifier - Character string that differentiates the error message from other error messages
Exception message - Explanation of the error message
Parameters - Placeholders for the specific classes, methods, and qualifiers that are cited in the exception message
For example, the MOF Compiler may return the following error message:
REF_REQUIRED = Association class CIM_Docked needs at least two refs. Error in line 12.
REF_REQUIRED is the unique identifier.
Association class CIM_Docked needs at least two refs is the exception message.
CIM_Docked is a parameter. A parameter can be replaced with the name of any appropriate class, property, method, or qualifier.
WBEM provides exception templates for all possible error messages in the ErrorMessages_en.properties file of the APIs. In an exception template that requires parameters, the first parameter is represented as {0} and the second parameter is represented as {1}.
The following exception template is used in the previous example:
REF_REQUIRED = Association class {0} needs at least two refs.