Better error catching 2

Former-commit-id: f6ae4a88645163388a077a50c2afde31a2c4bbac [formerly 89e82d5db250479ea1d67d954630105dda662aee]
Former-commit-id: 761c788de343027f4329aa069058b45b2522ad3a
This commit is contained in:
Jaifroid 2020-07-19 15:24:15 +01:00
parent aa229c8cad
commit 7c402f21fb

View File

@ -3114,8 +3114,8 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki
return;
}
// Set a global error handler for iframe
window.frames[0].onerror = function (msg, url) {
console.log('Error caught in ZIM contents [' + url + ']:\n' + msg, msg);
window.frames[0].onerror = function (msg, url, line, col, error) {
console.error('Error caught in ZIM contents [' + url + ':' + line + ']:\n' + msg, error);
return true;
};