GetDescription Method (ERROR)
10.1A, PLBCMP GUI Only
The GetDescription method retrieves the description associated with PL/B error codes. The error descriptions are defined in XML format and can be found in the default 'plberrors.xml' or a user XML file. This method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. An ERROR object that has been previously declared.
return
Optional. A Numeric Variable that returns the maximum number of errors allowed on the error stack.
code
Required. A Character String Variable or string literal that specifies the error code string. For example the error code can be "C09".
subcode
Required. A Character String Variable or string literal that specifies the subcode string. For example, the subcode string can be "21".
filename
Optional. A Character String Variable or string literal that specifies the file name which contains user defined error codes and descriptions.
flags
Optional. A Numeric Variable or decimal number that specifies a bit mask value that controls the behaviors of this method.
Flags Affected: EOS, OVER, ZERO
Note the following:
The OVER and ZERO flags are always set to be FALSE.
The EOS flag is set to be TRUE if the {return} variable is too small to receive the description without being truncated.
The {flags} bit mask values parameter is implemented for future usage.
The {code} and {subcode} strings are case sensitive and must match the <Error> data exactly.
If the {filename} parameter is not specified for this method, the default file name used by the PL/B runtime is 'plberrors.xml'. When the {filename} parameter is specified,the file name is a XML file that contains user error codes and descriptions. In any case, the 'plberrors.xml' or the user XML file must have the format as follows:
Where:
<Runtime_Errors>
Root XML tag.
<Version>
Xml element tag that contains the runtime version.
<Error>
Xml element tag that contains the error, subcode, type, and description attributes for an error.
See Also: Method Syntax, ERROR Methods
![]() |