Class: SwarmError
Base class for all Swarm errors.
Extends
Error
Extended by
Constructors
Constructor
ts
new SwarmError(message: string, options?: SwarmErrorOptions): SwarmError;Creates a new SwarmError instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | The error message. |
options? | SwarmErrorOptions | The error options. |
Returns
SwarmError
Overrides
ts
Error.constructor;Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
cause? | public | unknown | - | Error.cause |
stack? | public | string | - | Error.stack |
prepareStackTrace? | static | (err: Error, stackTraces: CallSite[]) => any | Optional override for formatting stack traces See https://v8.dev/docs/stack-trace-api#customizing-stack-traces | Error.prepareStackTrace |
stackTraceLimit | static | number | - | Error.stackTraceLimit |
Accessors
[toStringTag]
Get Signature
ts
get toStringTag: string;Returns
string
message
Get Signature
ts
get message(): string;Returns
string
Overrides
ts
Error.message;name
Get Signature
ts
get name(): string;Returns
string
Overrides
ts
Error.name;Methods
[toPrimitive]()
ts
toPrimitive: string | true;Parameters
| Parameter | Type |
|---|---|
hint | "string" | "number" | "default" |
Returns
string | true
toString()
ts
toString(): string;Returns a string representation of an object.
Returns
string
[hasInstance]()
ts
static hasInstance: boolean;Parameters
| Parameter | Type |
|---|---|
instance | unknown |
Returns
boolean
captureStackTrace()
ts
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;Create .stack property on a target object
Parameters
| Parameter | Type |
|---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
ts
Error.captureStackTrace;