MCPcopy Create free account
hub / github.com/Starcounter-Jack/JSON-Patch / constructor

Method constructor

src/helpers.ts:160–164  ·  view source on GitHub ↗
(message: string, public name: JsonPatchErrorName, public index?: number, public operation?: any, public tree?: any)

Source from the content-addressed store, hash-verified

158}
159export class PatchError extends Error {
160 constructor(message: string, public name: JsonPatchErrorName, public index?: number, public operation?: any, public tree?: any) {
161 super(patchErrorMessageFormatter(message, { name, index, operation, tree }));
162 Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359
163 this.message = patchErrorMessageFormatter(message, { name, index, operation, tree });
164 }
165}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected