From ac20abbb69a933c73689a28813dc9e7d1de7c97f Mon Sep 17 00:00:00 2001 From: YourFriendlyNeighborhoodDealer Date: Wed, 13 Mar 2019 09:48:34 +0100 Subject: [PATCH] Added some logging on certain exceptions --- main.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 7909cf3..3842beb 100644 --- a/main.js +++ b/main.js @@ -22,8 +22,7 @@ var data; // all data, which is in the resource txt var addEventListener; // add event listener function -const lastChangeLog = - '- Passzív mód: ha bepipálod a menü gomb alatt, akkor nem tölti be minden alkalommal a kérdéseket (csak csendben vár).\n - Pár lényeges bugfix\n - Ha találkoztok bugokkal, akkor pls report! thanx'; +const lastChangeLog = ''; // TODO const serverAdress = "https://qmining.tk/"; // forcing pages for testing. unless you test, do not set these to true! @@ -522,6 +521,7 @@ class ResultsPageModell { currQuestion = this.GetCurrQuestion(i); } catch (e) { currQuestion = "REEEEEEEEEEEEEEEEEEEEE"; // this shouldnt really happen sry guys + Log("Unable to get question in GetQuestionFromResult"); } } } @@ -1055,7 +1055,9 @@ var AlertOnNoQuestion = (i) => { try { if (i >= data.length) document.getElementById("HelperMenuButton").style.background = "yellow"; - } catch (e) {} + } catch (e) { + Log("Unable to get helper menu button"); + } }; //: }}} @@ -1068,7 +1070,9 @@ function HandleUI(url, count, subjCount) { try // try, cus im suspicious { newVersion = GM_info.script.version !== GM_getValue("lastVerson"); - } catch (e) {} + } catch (e) { + Log("Some weird error trying to set new verison"); + } var greetMsg = ""; // message to show at the end var timeout = null; // the timeout. if null, it wont be hidden // no new version, nothing loaded @@ -1292,7 +1296,9 @@ function GetImageFormResult(i) { temp = JSON.stringify(imgURL); return temp; } - } catch (e) {} + } catch (e) { + Log("Couldn't get images from result"); + } } // saves the current quiz. questionData contains the active subjects questions