Mercurial Hosting > freedit
annotate 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 |
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 }; |