mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Improved logged JavaScript error message
This commit is contained in:
parent
2af014dad2
commit
1aea4d83a2
@ -30,11 +30,12 @@
|
||||
NINJA.isRegistered = {{ Utils::isRegistered() ? 'true' : 'false' }};
|
||||
|
||||
window.onerror = function(e) {
|
||||
var message = e.message ? (e.message + ' - ' + e.filename + ': ' + e.lineno) : e;
|
||||
try {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '{{ URL::to('log_error') }}',
|
||||
data: 'error='+encodeURIComponent(e.message + ' - ' + e.filename + ': ' + e.lineno)+'&url='+encodeURIComponent(window.location)
|
||||
data: 'error='+encodeURIComponent(message)+'&url='+encodeURIComponent(window.location)
|
||||
});
|
||||
} catch(err) {}
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user