view src/site.js @ 61:389e5d8e5f8a default tip

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 06 Dec 2022 13:37:25 -0700
parents 78b2d6995244
children
line wrap: on
line source


window.onerror = function(msg, url, line, col, error) {
	if (!url)
		return;
	let err = msg;
	err += '\nurl = ' + url;
	if (url != window.location)
		err += '\npage = ' + window.location;
	err += '\nline = '+line;
	if (col)
		err += '\ncolumn = ' + col;
	if (error && error.stack)
		err += '\nstack = ' + error.stack;
	ajax( '/error_log.js', 'err='+encodeURIComponent(err) );
};