CAN DragonEmSA
methodCanDragonDevice

CanDragonDevice.GetLastError

Prototype

string GetLastError(int max = 256);

Description

Last native error for this session.

Parameters

ParameterDirectionTypeDescription
maxinMax wchar length.

Return value

Error text or empty.

Example

try { device.OpenChannel(0); }

catch (EmSACANException ex)

{

    Console.WriteLine($"{ex.Message}{device.GetLastError()}");

}