getMsg()

Retrieves a message from the ODA message file.

Syntax

public String getMsg(int msgNum, int msgType);
public String getMsg(int msgNum, int msgType, msgParameters);
public String getMsg(int msgNum, int msgType, Vector paramArray);

Parameters

msgNum
Specifies the message number from the message file.

msgParameters
Is an optional list of up to three String parameter values, each corresponding to a parameter in the message list.

msgType
Is the type of message, specified as one of the following message-type constants:
ODKConstant.XRD_FATAL

 
ODKConstant.XRD_ERROR

 
ODKConstant.XRD_URGENTWARNING

 
ODKConstant.XRD_WARNING

 
ODKConstant.XRD_INFO

paramArray
Is an optional list of parameters, as a Java Vector, to be inserted in the message's parameters.

Exceptions

IllegalArgumentException
Thrown if the msgType argument is not valid.

Return values

A String that contains the text associated with the specified message number. If message parameters have been provided, these values have been inserted as appropriate into the message. If msgNum is not valid, the method returns null.

Notes

The getMsg() method retrieves a message from a message file. It identifies the name of this file from the MessageFile startup property, which the ODK automatically includes with the ODA startup properties. The getMsg() method provides the following forms:

For information on ODA message files, see Message files. For information on message parameters, see Using parameter values.

See also

trace()

Copyright IBM Corp. 1997, 2003