Commit adfb53e8 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Do not hide worker errors in the console

parent 0437df1c
...@@ -180,8 +180,12 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) { ...@@ -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});
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment