twice error catching improved

pull/7/head
aniket-engg 5 years ago committed by Aniket
parent a481632b53
commit f820dbe140
  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
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)

@ -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 })
})

Loading…
Cancel
Save