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

Function PatchError

module/helpers.mjs:158–168  ·  view source on GitHub ↗
(message, name, index, operation, tree)

Source from the content-addressed store, hash-verified

156var PatchError = /** @class */ (function (_super) {
157 __extends(PatchError, _super);
158 function PatchError(message, name, index, operation, tree) {
159 var _newTarget = this.constructor;
160 var _this = _super.call(this, patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree })) || this;
161 _this.name = name;
162 _this.index = index;
163 _this.operation = operation;
164 _this.tree = tree;
165 Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359
166 _this.message = patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree });
167 return _this;
168 }
169 return PatchError;
170}(Error));
171export { PatchError };

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected