Pārlūkot izejas kodu

Add basic error reporting

master
Fen Dweller pirms 3 gadiem
vecāks
revīzija
ffddadcfea
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. +2
    -0
      macrovision.html

+ 2
- 0
macrovision.html Parādīt failu

@@ -42,12 +42,14 @@
if (firsterror) {
firsterror = false;
alert("An error occured. If you're on a computer, hit F12 to open the developer tools, click the Console tab, and send the red text to chemicalcrux. If you're on mobile, screenshot this instead:\n\n" + msg + "\n" + url + "\n" + "line: " + line + "\n" + "col: " + col + "\nerror: " + error);
umami.trackEvent(line + ":" + col + " " + msg, "error")
}
}
window.onunhandledrejection = function(e) {
if (firsterror) {
firsterror = false;
alert("An error occured. If you're on a computer, hit F12 to open the developer tools, click the Console tab, and send the red text to chemicalcrux. If you're on mobile, screenshot this instead:\n\n" + e.reason);
umami.trackEvent(line + ":" + col + " " + msg, "error")
}
}
</script>


Notiek ielāde…
Atcelt
Saglabāt