getErrorType()

Returns the type of error from getLastError() from the error class.

Synopsis

int getErrorType(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 return value may assume any of the following values:

Value Meaning
ERR_IMPL implementation error
ERR_PARAM configuration error
ERR_SYSTEM system error
ERR_CONTROL Control runtime error
ERR_REDUNDANCY redundancy error

Error

If no error had occurred

Description

The value returned from the Control function getLastError() defines an error class that is composed of several attributes. From this, the error type can be filtered out, for example, with getErrorType().

Example

main()
{
  dyn_errClass err;
  int retErr;
  err = getLastError(); //get the error
  if(dynlen(err) > 0)
  {
    retErr = getErrorType(err); //get the error type
    errorDialog(err); //show the error
    DebugN(retErr);
  }
  else
  {
    DebugN("OK"); // No error
  }
}

Assignment

Errors

Availability

CTRL