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

Function formatRuntimeError

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

Source from the content-addressed store, hash-verified

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

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