UNPKG

resolve-local-event-broker

Version:

The reSolve framework's event broker for applications on a local machine.

41 lines (33 loc) 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ResourceAlreadyExistError = ResourceAlreadyExistError; exports.ResourceNotExistError = ResourceNotExistError; function ResourceAlreadyExistError(message) { Error.call(this); this.code = 406; this.name = 'ResourceAlreadyExistError'; this.message = message; if (Error.captureStackTrace) { Error.captureStackTrace(this, ResourceAlreadyExistError); } else { this.stack = new Error().stack; } } ResourceAlreadyExistError.is = error => error != null && error.name === 'ResourceAlreadyExistError'; function ResourceNotExistError(message) { Error.call(this); this.code = 410; this.name = 'ResourceNotExistError'; this.message = message; if (Error.captureStackTrace) { Error.captureStackTrace(this, ResourceNotExistError); } else { this.stack = new Error().stack; } } ResourceNotExistError.is = error => error != null && error.name === 'ResourceNotExistError'; ResourceAlreadyExistError.prototype = Object.create(Error.prototype); ResourceNotExistError.prototype = Object.create(Error.prototype); //# sourceMappingURL=lifecycle-errors.js.map