MCPcopy
hub / github.com/angular/angular / throwProviderNotFoundError

Function throwProviderNotFoundError

packages/core/src/render3/errors_di.ts:68–76  ·  view source on GitHub ↗
(
  token: ProviderToken<unknown>,
  injectorName?: string,
)

Source from the content-addressed store, hash-verified

66
67/** Throws an error when a token is not found in DI. */
68export function throwProviderNotFoundError(
69 token: ProviderToken<unknown>,
70 injectorName?: string,
71): never {
72 const errorMessage =
73 ngDevMode &&
74 `No provider for ${stringifyForError(token)} found${injectorName ? ` in ${injectorName}` : ''}`;
75 throw new RuntimeError(RuntimeErrorCode.PROVIDER_NOT_FOUND, errorMessage);
76}
77
78/**
79 * Given an Error instance and the current token - update the monkey-patched

Callers 3

injectRootLimpModeFunction · 0.90
notFoundValueOrThrowFunction · 0.90

Calls 1

stringifyForErrorFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…