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

Function PatchError

commonjs/helpers.js:168–178  ·  view source on GitHub ↗
(message, name, index, operation, tree)

Source from the content-addressed store, hash-verified

166var PatchError = /** @class */ (function (_super) {
167 __extends(PatchError, _super);
168 function PatchError(message, name, index, operation, tree) {
169 var _newTarget = this.constructor;
170 var _this = _super.call(this, patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree })) || this;
171 _this.name = name;
172 _this.index = index;
173 _this.operation = operation;
174 _this.tree = tree;
175 Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359
176 _this.message = patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree });
177 return _this;
178 }
179 return PatchError;
180}(Error));
181exports.PatchError = PatchError;

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected