Merge pull request #209 from ethereum/worker-error-reporting

Do not hide worker errors in the console
pull/1/head
chriseth 8 years ago committed by GitHub
commit b6356b689c
  1. 8
      src/app/compiler.js

@ -180,8 +180,12 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) {
break; break;
} }
}); });
worker.onerror = function (msg) { console.log(msg.data); }; worker.onerror = function (msg) {
worker.addEventListener('error', function (msg) { console.log(msg.data); }); compilationFinished({ error: 'Worker error: ' + msg.data });
};
worker.addEventListener('error', function (msg) {
compilationFinished({ error: 'Worker error: ' + msg.data });
});
compileJSON = function (source, optimize) { compileJSON = function (source, optimize) {
worker.postMessage({cmd: 'compile', source: JSON.stringify(source), optimize: optimize}); worker.postMessage({cmd: 'compile', source: JSON.stringify(source), optimize: optimize});
}; };

Loading…
Cancel
Save