From f820dbe140e12190ee6e0f34d3c45d4f8328e116 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 26 Nov 2019 19:37:28 +0530 Subject: [PATCH] twice error catching improved --- remix-solidity/src/compiler/compiler-worker.js | 6 +----- remix-solidity/src/compiler/compiler.js | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/remix-solidity/src/compiler/compiler-worker.js b/remix-solidity/src/compiler/compiler-worker.js index d662c5d7fe..4a4e0242a9 100644 --- a/remix-solidity/src/compiler/compiler-worker.js +++ b/remix-solidity/src/compiler/compiler-worker.js @@ -16,11 +16,7 @@ module.exports = function (self) { compileJSON = null - try { - self.importScripts(data.data) - } catch (exception) { - return JSON.stringify({ error: 'Uncaught JavaScript exception:\n' + exception }) - } + self.importScripts(data.data) var compiler = solc(self.Module) diff --git a/remix-solidity/src/compiler/compiler.js b/remix-solidity/src/compiler/compiler.js index ba083f64ef..711f84efbf 100644 --- a/remix-solidity/src/compiler/compiler.js +++ b/remix-solidity/src/compiler/compiler.js @@ -298,9 +298,6 @@ function Compiler (handleImportCall) { break } }) - worker.onerror = function (msg) { - compilationFinished({ error: 'Worker error: ' + msg.data }) - } worker.addEventListener('error', function (msg) { compilationFinished({ error: 'Worker error: ' + msg.data }) })