twice error catching improved

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