mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-11 16:18:10 +00:00
Write captured errors to body.data-report attribute
This commit is contained in:
parent
5a12d3210c
commit
9c28f51817
@ -691,6 +691,13 @@ export class PsychoJS
|
||||
window.onerror = function (message, source, lineno, colno, error)
|
||||
{
|
||||
console.error(error);
|
||||
document.body.setAttribute('data-error', JSON.stringify({
|
||||
message: message,
|
||||
source: source,
|
||||
lineno: lineno,
|
||||
colno: colno,
|
||||
error: error.stack
|
||||
}));
|
||||
self._gui.dialog({"error": error});
|
||||
return true;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user