* Reports an error to the server. Must only be called once per page. * Not for use in event handlers. * * We don't use the default error in error.js handler because it has * too many deps for this small JS binary. * * @param {!Error} e * @param {boolean} isCanary
(e, isCanary)
| 344 | * @param {boolean} isCanary |
| 345 | */ |
| 346 | function lightweightErrorReport(e, isCanary) { |
| 347 | new Image().src = |
| 348 | urls.errorReporting + |
| 349 | '?3p=1&v=' + |
| 350 | encodeURIComponent(mode.version()) + |
| 351 | '&m=' + |
| 352 | encodeURIComponent(e.message) + |
| 353 | '&ca=' + |
| 354 | (isCanary ? 1 : 0) + |
| 355 | '&r=' + |
| 356 | encodeURIComponent(document.referrer) + |
| 357 | '&s=' + |
| 358 | encodeURIComponent(e.stack || ''); |
| 359 | } |