Skip to content

Class: TransportError

Base class for transport-layer errors.

Wraps a transport-specific failure with the TransportType it came from, so callers can branch on transport (USB vs TCP vs BLE) without string-matching error messages.

Extends

  • Error

Extended by

Constructors

Constructor

ts
new TransportError(message: string, transport: TransportType): TransportError;

Parameters

ParameterType
messagestring
transportTransportType

Returns

TransportError

Overrides

ts
Error.constructor

Properties

cause?

ts
optional cause?: unknown;

Inherited from

ts
Error.cause

message

ts
message: string;

Inherited from

ts
Error.message

name

ts
name: string;

Inherited from

ts
Error.name

stack?

ts
optional stack?: string;

Inherited from

ts
Error.stack

transport

ts
readonly transport: TransportType;