MCPcopy Create free account
hub / github.com/angular/angular / formatRuntimeError

Function formatRuntimeError

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

Source from the content-addressed store, hash-verified

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

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
walkIcuTreeFunction · 0.90
ɵɵrepeaterFunction · 0.90

Calls 2

formatRuntimeErrorCodeFunction · 0.85
matchMethod · 0.45

Tested by

no test coverage detected