Mercurial Hosting > freedit
annotate src/site.js @ 56:7ce54f6d93f2
add change name
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 28 Nov 2022 22:00:43 -0700 |
parents | 78b2d6995244 |
children |
rev | line source |
---|---|
7 | 1 |
2 window.onerror = function(msg, url, line, col, error) { | |
3 if (!url) | |
4 return; | |
5 let err = msg; | |
6 err += '\nurl = ' + url; | |
7 if (url != window.location) | |
8 err += '\npage = ' + window.location; | |
9 err += '\nline = '+line; | |
10 if (col) | |
11 err += '\ncolumn = ' + col; | |
12 if (error && error.stack) | |
13 err += '\nstack = ' + error.stack; | |
14 ajax( '/error_log.js', 'err='+encodeURIComponent(err) ); | |
15 }; |