You can specify inserts for inclusion in the message. The function typically retrieves a custom error message.
vgj.messages.file = files/messages/errorMessagesIn the simplest case, you have a single file in the files/messages folder named errorMessages.properties. If you need national language support, add an underscore and a two-letter language code to the base name, such as errorMessages_fr.properties.
For information about setting Java runtime properties such as vgj.messages.file, see Overview of Java runtime properties. For a more complete description of the way messages are formatted, see your Java API docs for the class java.text.MessageFormat.
Language codes follow the ISO 639-2 standard, and country codes follow the ISO 3166 standard. For more information, see the related reference links at the end of this topic.
key = message
key is a unique string that identifies the message. The message can contain integers within braces to indicate points where you can make substitutions. Start the integers with 0 and increment in order; these integers provide indexes into an array of substitution strings. See the examples later in this topic.
If you use multiple language versions, the key identifiers must be the same across all versions of the file.
sysLib.getMessage( key STRING in [, insertArray STRING[] in]) returns (result STRING)
VGJ0216E = {0} is not a valid date mask for {1}.
The first element in insertArray is assigned to the placeholder numbered 0, the second element is assigned to the placeholder numbered 1, and so forth.
The following example is an entry from the message file errorMessages_en_US.properties:
badname = The name you entered, {0}, is not valid.
userName STRING = getUserName(); // ask for input rc = validateUserName(userName); if (rc < 0) SysLib.setError( SysLib.getMessage( "badname", [ userName ] ) ); end