Skip to main content

Class: PortCheckError

Defined in: electron/services/monitoring/utils/portErrorHandling.ts:106

Custom error class for port connectivity failures, preserving response time information.

Remarks

Extends the standard ://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error class to include timing data, supporting diagnostics and retry/backoff strategies.

Example

throw new PortCheckError("Port not reachable", 1200);

Param

The error message describing the failure.

Param

The time taken until failure in milliseconds.

Extends

Constructors

Constructor

new PortCheckError(message: string, responseTime: number): PortCheckError

Defined in: electron/services/monitoring/utils/portErrorHandling.ts:128

Constructs a new PortCheckError with timing information.

Parameters

message

string

The error message describing the failure.

responseTime

number

The time taken until failure in milliseconds.

Returns

PortCheckError

Remarks

Sets the error name to "PortCheckError" and preserves the response time for analysis.

Overrides

Error.constructor

Properties

responseTime

readonly responseTime: number

Defined in: electron/services/monitoring/utils/portErrorHandling.ts:114

The response time at the point of failure, in milliseconds.