Skip to content

UdsException Class

Base type for every error surfaced by IUdsClient. Subclasses distinguish the three families the MVP cares about: a well-formed negative response from the ECU (UdsNegativeResponseException), an ECU that failed to respond within its P2/P2* budget (UdsTimeoutException), and a malformed / mismatched response (UdsProtocolException). Transport-layer failures are re-thrown as-is (they are already typed as IsoTpException subclasses). Derives from CanKitException so L2/L3/L4 failures can be caught uniformly across the library (NFR-006 error architecture, arc42 ADR-12).

public class UdsException : CanKit.Core.Exceptions.CanKitException

Inheritance ObjectExceptionCanKitException → UdsException

Derived
UdsNegativeResponseException
UdsProtocolException
UdsTimeoutException

Constructors

UdsException(CanKitErrorCode, string) Constructor

Creates a new UDS error with a specific library error code.

protected UdsException(CanKit.Core.Exceptions.CanKitErrorCode errorCode, string message);

Parameters

errorCode CanKitErrorCode

message String

UdsException(string) Constructor

Creates a new UDS error with the given message.

public UdsException(string message);

Parameters

message String

UdsException(string, Exception) Constructor

Creates a new UDS error wrapping an inner cause.

public UdsException(string message, System.Exception innerException);

Parameters

message String

innerException Exception