MCPcopy
hub / github.com/ampproject/amphtml / reportErrorForWin

Function reportErrorForWin

src/error-reporting.js:131–141  ·  view source on GitHub ↗
(win, error, opt_associatedElement)

Source from the content-addressed store, hash-verified

129 * @param {!Element=} opt_associatedElement
130 */
131export function reportErrorForWin(win, error, opt_associatedElement) {
132 reportError(error, opt_associatedElement);
133 if (
134 error &&
135 !!win &&
136 isUserErrorMessage(error.message) &&
137 !isUserErrorEmbedMessage(error.message)
138 ) {
139 reportErrorToAnalytics(/** @type {!Error} */ (error), win);
140 }
141}
142
143/**
144 * Reports an error. If the error has an "associatedElement" property

Callers

nothing calls this directly

Calls 4

isUserErrorMessageFunction · 0.90
isUserErrorEmbedMessageFunction · 0.90
reportErrorFunction · 0.85
reportErrorToAnalyticsFunction · 0.85

Tested by

no test coverage detected