From e9bf754382a9de512f155714a4723fa65bc80e98 Mon Sep 17 00:00:00 2001 From: Sotiri Bakagiannis Date: Mon, 14 Jun 2021 22:34:49 +0100 Subject: [PATCH] core/PsychoJS: restore _captureErrors --- src/core/PsychoJS.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/core/PsychoJS.js b/src/core/PsychoJS.js index 3b6882bc..9c965b4f 100644 --- a/src/core/PsychoJS.js +++ b/src/core/PsychoJS.js @@ -728,32 +728,11 @@ 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 - })); self._gui.dialog({"error": error}); return true; }; - window.onunhandledrejection = function (error) - { - console.error(error?.reason); - if (error?.reason?.stack === undefined) { - // No stack? Error thrown by PsychoJS; stringify whole error - document.body.setAttribute('data-error', JSON.stringify(error?.reason)); - } else { - // Yes stack? Error thrown by JS; stringify stack - document.body.setAttribute('data-error', JSON.stringify(error?.reason?.stack)); - } - self._gui.dialog({error: error?.reason}); - return true; - }; }