Skip to content

Class: UnsupportedEnvironmentError

Thrown by the Swarm class when trying to be initialized in an environment that does not support Service Workers.

Extends

Constructors

Constructor

ts
new UnsupportedEnvironmentError(): UnsupportedEnvironmentError;

Returns

UnsupportedEnvironmentError

Overrides

SwarmError.constructor

Properties

PropertyModifierTypeDescriptionInherited from
cause?publicunknown-SwarmError.cause
stack?publicstring-SwarmError.stack
prepareStackTrace?static(err: Error, stackTraces: CallSite[]) => anyOptional override for formatting stack traces See https://v8.dev/docs/stack-trace-api#customizing-stack-tracesSwarmError.prepareStackTrace
stackTraceLimitstaticnumber-SwarmError.stackTraceLimit

Accessors

[toStringTag]

Get Signature

ts
get toStringTag: string;
Returns

string

Inherited from

SwarmError.[toStringTag]


message

Get Signature

ts
get message(): string;
Returns

string

Inherited from

SwarmError.message


name

Get Signature

ts
get name(): string;
Returns

string

Inherited from

SwarmError.name

Methods

[toPrimitive]()

ts
toPrimitive: string | true;

Parameters

ParameterType
hint"string" | "number" | "default"

Returns

string | true

Inherited from

SwarmError.[toPrimitive]


toString()

ts
toString(): string;

Returns a string representation of an object.

Returns

string

Inherited from

SwarmError.toString


[hasInstance]()

ts
static hasInstance: boolean;

Parameters

ParameterType
instanceunknown

Returns

boolean

Inherited from

SwarmError.[hasInstance]


captureStackTrace()

ts
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

SwarmError.captureStackTrace