TouchUI.prototype.core.exception = function() {

	var old = window.onerror || function() {};
	window.onerror = function() {
		old.call(this, arguments);

		// Supress these errors
		if(arguments[0].indexOf("CanvasRenderingContext2D") > -1) {//Failed to execute 'arc' on 'CanvasRenderingContext2D'
			return;
		}
		if(arguments[0].indexOf("highlightFill") > -1) {//Cannot read property 'highlightFill'
			return;
		}

		var text = '<p>Please help improving this plugin by <a href="https://github.com/BillyBlaze/OctoPrint-TouchUI/issues/new">submiting</a> the following error together with the OctoPrint version and browser you\'re using: </p><ul><li>';
		if(arguments.length > 4) {
			text += "<strong>" + arguments[4].message + "</strong><br>";
			text += "<small>" + arguments[4].stack + "</small>";
		} else {
			text += "<strong>" + arguments[0] + "</strong><br>";
			text += "<small>" + arguments[1] + " @ " + arguments[2] + "</small>";
		}

		text += "</li></ul>";

		new PNotify({
			title: 'TouchUI: Javascript error...',
			text:  text,
			icon: 'glyphicon glyphicon-question-sign',
			type: 'error',
			hide: false,
			confirm: false
		});

	}
}

@@ -531,16 +531,28 @@
 sues/new
+?body=%7BBODY%7D
 %22%3Esubmit
@@ -655,17 +655,45 @@
 ul%3E%3Cli%3E'
-;
+,%0A%09%09%09err = '',%0A%09%09%09body = '';%0A
 %0A%09%09if(ar
@@ -713,28 +713,27 @@
 h %3E 4) %7B%0A%09%09%09
-text
+err
  += %22%3Cstrong
@@ -772,36 +772,35 @@
 trong%3E%3Cbr%3E%22;%0A%09%09%09
-text
+err
  += %22%3Csmall%3E%22 + 
@@ -842,28 +842,27 @@
 %7D else %7B%0A%09%09%09
-text
+err
  += %22%3Cstrong
@@ -901,20 +901,19 @@
 r%3E%22;%0A%09%09%09
-text
+err
  += %22%3Csm
@@ -984,16 +984,22 @@
 %09text +=
+ err +
  %22%3C/li%3E%3C
@@ -1004,16 +1004,141 @@
 %3E%3C/ul%3E%22;
+%0A%09%09body = encodeURIComponent(%22%5Cn%5Cn%5Cn------- %5Cn%60%60%60%60%5Cn%22 + err.replace(/(%3Cbr%3E)/g, %22%5Cn%22).replace(/(%3C(%5B%5E%3E%5D+)%3E)/g, %22%22) + %22%5Cn%60%60%60%60%22);
 %0A%0A%09%09new 
@@ -1203,16 +1203,40 @@
 t:  text
+.replace(%22%7BBODY%7D%22, body)
 ,%0A%09%09%09ico

Update link to github with javascript error and stack