Merge pull request #26 from ethereum/patch/solc-catch-exceptions

Catch JSON parsing errors of the Solidity output
pull/1/head
chriseth 9 years ago
commit 2222e0b1af
  1. 9
      src/app.js

@ -624,9 +624,16 @@ var run = function() {
});
};
var compilationFinished = function(result, missingInputs) {
var data = $.parseJSON(result);
var data;
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) {
renderError(data['error']);
if (errortype(data['error']) !== 'warning') noFatalErrors = false;

Loading…
Cancel
Save