UNPKG

rage-framework

Version:

## How to Install *server-side* ```bash npm install @rage-framework/server ```

28 lines 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ServiceNotFoundError = void 0; const Token_1 = require("../Token"); class ServiceNotFoundError extends Error { constructor(identifier) { super(); this.name = 'ServiceNotFoundError'; if (typeof identifier === 'string') { this.message = `Service '${identifier}' was not found, looks like it was not registered in the container. ` + `Register it by calling Container.set('${JSON.stringify(identifier)}', ...) before using service.`; } else if (identifier instanceof Token_1.Token && identifier.name) { this.message = `Service '${identifier.name}' was not found, looks like it was not registered in the container. ` + `Register it by calling Container.set before using service.`; } else if (identifier instanceof Token_1.Token) { this.message = `Service with a given token was not found, looks like it was not registered in the container. ` + `Register it by calling Container.set before using service.`; } Object.setPrototypeOf(this, ServiceNotFoundError.prototype); } } exports.ServiceNotFoundError = ServiceNotFoundError; //# sourceMappingURL=ServiceNotFoundError.js.map