From c2d19a35918c47f2a00c8617b5387485ec90ecef Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Mon, 26 Feb 2018 14:15:46 -0500 Subject: [PATCH] Trying to get error logging going. --- game.js | 5 +++++ stroll.html | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/game.js b/game.js index 1a0b60d..906e5bb 100644 --- a/game.js +++ b/game.js @@ -2,6 +2,11 @@ /*jshint browser: true*/ +window.onerror = function(msg, source, lineno, colno, error) { + let line = "in: " + source + " at line: " + lineno + ", col: " + colno; + alert("Error! " + msg + error); +} + // do da dark mode let dark = false; diff --git a/stroll.html b/stroll.html index 6f1bb56..be8a47c 100644 --- a/stroll.html +++ b/stroll.html @@ -4,10 +4,10 @@ Stroll - - - - + + + +