UNPKG

@carlosv2/glue

Version:

Dependency injection library that stays out of the way

24 lines (23 loc) 873 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnknownServiceTypeError = exports.ServiceNotFoundError = void 0; const error_1 = require("../error"); class ServiceNotFoundError extends error_1.DiError { constructor(id, context) { const message = [`Service definition \`${id}\` was not found.`]; if (context) { const representation = context.getRepresentation(); if (representation.length) { message.push(`Chain of requests:\n${representation}`); } } super(message.join(' ')); } } exports.ServiceNotFoundError = ServiceNotFoundError; class UnknownServiceTypeError extends error_1.DiError { constructor(context) { super('Unable to determine service type.', context); } } exports.UnknownServiceTypeError = UnknownServiceTypeError;