twice error catching improved

pull/5370/head
aniket-engg 5 years ago committed by Aniket
parent 182e6054c1
commit 04334a2625
  1. 6
      remix-solidity/src/compiler/compiler-worker.js
  2. 3
      remix-solidity/src/compiler/compiler.js

@ -16,11 +16,7 @@ module.exports = function (self) {
compileJSON = null compileJSON = null
try { self.importScripts(data.data)
self.importScripts(data.data)
} catch (exception) {
return JSON.stringify({ error: 'Uncaught JavaScript exception:\n' + exception })
}
var compiler = solc(self.Module) var compiler = solc(self.Module)

@ -298,9 +298,6 @@ function Compiler (handleImportCall) {
break break
} }
}) })
worker.onerror = function (msg) {
compilationFinished({ error: 'Worker error: ' + msg.data })
}
worker.addEventListener('error', function (msg) { worker.addEventListener('error', function (msg) {
compilationFinished({ error: 'Worker error: ' + msg.data }) compilationFinished({ error: 'Worker error: ' + msg.data })
}) })

Loading…
Cancel
Save