CanDragonDevice.GetLastError
Prototype
string GetLastError(int max = 256);
Description
Last native error for this session.
Parameters
| Parameter | Direction | Type | Description |
|---|---|---|---|
max | in | — | Max wchar length. |
Return value
Error text or empty.
Example
try { device.OpenChannel(0); }
catch (EmSACANException ex)
{
Console.WriteLine($"{ex.Message} — {device.GetLastError()}");
}