From 51db12dcad60fc75b070b27bd46b7cc591a3acda Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Fri, 17 Jul 2020 16:13:19 +0100 Subject: [PATCH] Better error reporting Former-commit-id: 5d979b4205ed196b5d5a8b9000ce5658e1dab288 [formerly 82a32c1c4c703d3eff7feca9dc7681883c0fc4ef] Former-commit-id: 16d64a99a597a87fe4ece204fda4c5eb4c330bc1 --- www/js/init.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/js/init.js b/www/js/init.js index da8bd513..48bf66d6 100644 --- a/www/js/init.js +++ b/www/js/init.js @@ -23,8 +23,8 @@ 'use strict'; // Set a global error handler to prevent app crashes -window.onerror = function (msg, url) { - console.error('Error caught in app [' + url + ']:\n' + msg, msg); +window.onerror = function (msg, url, line, col, error) { + console.error('Error caught in app [' + url + ':' + line + ']:\n' + msg, error); return true; };