getErrorText()

Returns the text part of an error message string from getLastError() from the error class (e.g. "no authorisation").

Synopsis

string makeError(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 text part of an error message string (e.g. "no authorisation")

Errors

If no error had occurred.

Description

The value returned from the Control function getLastError() defines an error class that is composed of several attributes. The function makeError() returns the text part of a error message string from getLastError() from the error class (e.g. "no authorisation").

Example

main()
{
  dyn_errClass err;
  retErr;
  err = getLastError();//get the error
  if(dynlen(err) > 0)
  {
    retErr = makeError(err);//get the error text
    DebugN(retErr);
  }
  else
  {
    DebugN("OK");// no error
  }
}

Assignment

Error

Availability

CTRL