MCPcopy
hub / github.com/angular/angular / formatRuntimeError

Function formatRuntimeError

packages/core/src/errors.ts:198–212  ·  view source on GitHub ↗
(
  code: T,
  message: null | false | string,
)

Source from the content-addressed store, hash-verified

196 * See additional info on the `message` argument type in the `RuntimeError` class description.
197 */
198export function formatRuntimeError<T extends number = RuntimeErrorCode>(
199 code: T,
200 message: null | false | string,
201): string {
202 const fullCode = formatRuntimeErrorCode(code);
203
204 let errorMessage = `${fullCode}${message ? ': ' + message : ''}`;
205
206 if (ngDevMode && code < 0) {
207 const addPeriodSeparator = !errorMessage.match(/[.,;!?\n]$/);
208 const separator = addPeriodSeparator ? '.' : '';
209 errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;
210 }
211 return errorMessage;
212}

Callers 15

logLazyLCPWarningFunction · 0.90
logOversizedImageWarningFunction · 0.90
emitMethod · 0.90
bootstrapFunction · 0.90
warnIfDestroyedFunction · 0.90
getPipeDefFunction · 0.90
reconcileFunction · 0.90
formatErrorMessageFunction · 0.90
getComponentIdFunction · 0.90
ɵɵrepeaterFunction · 0.90
validateElementIsKnownFunction · 0.90

Calls 2

formatRuntimeErrorCodeFunction · 0.85
matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…