errorText()
Returns the text for the error code. This function should not be used anymore but
remains included for reasons of compatibility. Instead of this function, use the
functions getCatStr()
or getErrorText()
. These functions allow the definition
of own error messages dependent on specific error codes. The error codes are saved in
the file _errors.cat
in the directory <wincc_oa_path>/msg/<lang>,
respectively in the same
file in the project directory.
Synopsis
string errorText(unsigned code [, unsigned langIdx]);
Parameters
Parameter | Meaning |
---|---|
code | Error code |
langIdx | Language (the default is the index of the current language) |
Return value
Returns the error text as a string. In the event of an error, returns an empty string.
Error
Possible error texts are contained in the directory <wincc_oa_path>/msg/<lang>
in
_errors.cat
.
Description
Returns the text for the error code code in the appropriate languagelangIdx. The langIdx can be determined with getLangIdx().
Example
Returns the error 1 in the current language.
main()
{
errClass err;
int errCode;
err = getLastError();
errCode = getErrorCode(err);
if (errCode > 0)
{
DebugN(errorText(1));
}
}
Assignment
Error
Availability
CTRL