@carlosv2/glue
Version:
Dependency injection library that stays out of the way
19 lines (18 loc) • 611 B
JavaScript
import { DiError } from '../error.js';
export class ServiceNotFoundError extends 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(' '));
}
}
export class UnknownServiceTypeError extends DiError {
constructor(context) {
super('Unable to determine service type.', context);
}
}