getErrorCode()
Returns the error code from the error class from getLastError().
Synopsis
int getErrorCode(errClass err | dyn_errClass err);
Parameters
Parameter | Description |
---|---|
err | Return value from getLastError().The parameter dyn_errClass returns the element of the LAST (!!) error that occurred. |
Return value
The function returns the code of the error in question.
Error
If there were no errors.
Description
The value returned from the Control function getLastError() defines an error class
that is composed of several attributes. From this, the code can be filtered out, for
example, with getErrorCode(). The possible error messages can be found in the file
<wincc_oa_path>/msg/<lang>/_errors.cat
.
Example
main()
{
dyn_errClass err;
int errCode;
err = getLastError();
errCode = getErrorCode(err);
if (errCode > 0)
{
DebugN(errorText(errCode));
}
}
Assignment
Errors
Availability
CTRL