Mercurial Hosting > freedit
annotate src/site.js @ 59:02d8876dc41d
improve change email
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 29 Nov 2022 18:45:22 -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 }; |