Merge pull request #101 from dummymarket/solcerror
throw error when solc fails
This commit is contained in:
commit
fd5d94b1d9
|
@ -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 = {}
|
||||
|
|
Loading…
Reference in New Issue