Skip to main content

AfdxGetLastErrorText

CAPL Functions » AFDX » AfdxGetLastErrorText Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

Function Syntax

long AfdxGetLastErrorText( dword bufSize, char[] buffer );

Description

Gets the error code description of the last called Afdx… function.

Parameters

  • bufSize: Size of buffer in which the description text is copied.
  • buffer: Buffer in which the description text is copied.

Return Values

Number of copied bytes.

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 );
}

See Also