throw error when solc fails

This commit is contained in:
Aakil Fernandes 2015-10-14 15:37:45 -04:00
parent d07ddaf1e8
commit 81fd274786

View File

@ -17,6 +17,10 @@ Compiler.prototype.compile_solidity = function(contractFile) {
var source = fs.readFileSync(contractFile).toString();
var output = solc.compile(source, 1);
if(output.errors && output.errors.length>0){
throw new Error(output.errors[0]);
}
var json = output.contracts;
compiled_object = {}