Skip to content
Start free evaluation

PDComm.PdcommException

Class

The exception thrown when a PDComm native operation returns a status other than PdcommStatus.Ok.

public sealed class PdcommException : Exception

Members

PdcommException

Constructor

Initializes a new exception for a native status.

public PdcommException(PdcommStatus status, nuint? errorOffset = null)

Parameters

NameDescription
statusThe native status that caused the failure.
errorOffsetThe byte offset of the field that failed to decode, or null when the failure has no input position.

ErrorOffset

Property

Gets the byte offset of the start of the field that failed to decode, or null when the failure has no input position.

public nuint? ErrorOffset { get; }

SecsItem.Decode sets this when decoding fails; the offset identifies the start of the failed field, not the first unavailable byte.

Status

Property

Gets the native status that caused the failure.

public PdcommStatus Status { get; }