Skip to main content

AfdxGetLastError

Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

Function Syntax

long AfdxGetLastError(void);

Description

Returns the error code of the last called Afdx… function.

Parameters

Return Values

See error code.

Example

char error[100];
long value;
long packetHandle;

value = AfdxGetTokenInt(packetHandle, "eth", "type");
if (AfdxGetLastError() == 0)
{
  write("Ethernet Type is 0x%x", value);
}
else
{
  AfdxGetLastErrorText(elCount(error), error);
  write("Error: %s", error);
}