9 <?php
if (
$block->isLoggingEnabled()): ?>
11 window.onerror =
function(msg, url, line) {
12 var key =
"<?= /* @escapeNotVerified */ $block->getSessionStorageKey() ?>";
14 if (sessionStorage.getItem(key)) {
15 errors = JSON.parse(sessionStorage.getItem(key));
17 if (!(window.location.href in errors)) {
18 errors[window.location.href] = [];
20 errors[window.location.href].push(
"error: \'" + msg +
"\' " +
"file: " + url +
" " +
"line: " + line);
21 sessionStorage.setItem(key, JSON.stringify(errors));