Commit 4172a86c authored by Alex Beregszaszi's avatar Alex Beregszaszi

Catch JSON parsing errors of the Solidity output

parent 1f726cef
...@@ -624,9 +624,16 @@ var run = function() { ...@@ -624,9 +624,16 @@ var run = function() {
}); });
}; };
var compilationFinished = function(result, missingInputs) { var compilationFinished = function(result, missingInputs) {
var data = $.parseJSON(result); var data;
var noFatalErrors = true; // ie warnings are ok var noFatalErrors = true; // ie warnings are ok
try {
data = $.parseJSON(result);
} catch (exception) {
renderError('Invalid JSON output from the compiler: ' + exception);
return;
}
if (data['error'] !== undefined) { if (data['error'] !== undefined) {
renderError(data['error']); renderError(data['error']);
if (errortype(data['error']) !== 'warning') noFatalErrors = false; if (errortype(data['error']) !== 'warning') noFatalErrors = false;
......
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