../pvss.htm menu.gif basics.gif

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

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().

IconExample

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

UI, CTRL, DP

See also

getLangIdx(), getGlobalLangId(), getCatStr(), makeError(), Error handling, getErrorText()

 

Top Of Page

 

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved