13 lines
460 B
TypeScript
13 lines
460 B
TypeScript
import {DependencyKey} from '../types'
|
|
import {ErrorWithContext} from '../../util/error/ErrorWithContext'
|
|
|
|
/**
|
|
* Error thrown when a dependency key that has not been registered is passed to a resolver.
|
|
* @extends Error
|
|
*/
|
|
export class InvalidDependencyKeyError extends ErrorWithContext {
|
|
constructor(key: DependencyKey, context: {[key: string]: any} = {}) {
|
|
super(`No such dependency is registered with this container: ${key}`, context)
|
|
}
|
|
}
|