MCPcopy Create free account
hub / github.com/instantdb/instant / constructor

Method constructor

client/packages/core/src/InstantError.ts:5–23  ·  view source on GitHub ↗
(message: string, hint?: unknown, traceId?: string)

Source from the content-addressed store, hash-verified

3 traceId?: string;
4
5 constructor(message: string, hint?: unknown, traceId?: string) {
6 super(message);
7 this.hint = hint;
8 if (traceId) {
9 this.traceId = traceId;
10 }
11
12 const actualProto = new.target.prototype;
13 if (Object.setPrototypeOf) {
14 Object.setPrototypeOf(this, actualProto);
15 }
16
17 // Maintain proper stack trace for where our error was thrown
18 if (Error.captureStackTrace) {
19 Error.captureStackTrace(this, InstantError);
20 }
21
22 this.name = 'InstantError';
23 }
24
25 get [Symbol.toStringTag]() {
26 return 'InstantError';

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected