don't stop when getting a compiler warning but print it as a warning
This commit is contained in:
parent
aa5efab6f9
commit
b56b51cf6e
|
@ -83,7 +83,11 @@ class Compiler {
|
|||
self.logger.info("compiling contracts...");
|
||||
solcW.compile({sources: input}, 1, function (output) {
|
||||
if (output.errors) {
|
||||
return callback(new Error("Solidity errors: " + output.errors).message);
|
||||
if (output.errors.length === 1 && output.errors[0].indexOf('Warning:') >= 0) {
|
||||
self.logger.warn(output.errors[0]);
|
||||
} else {
|
||||
return callback(new Error("Solidity errors: " + output.errors).message);
|
||||
}
|
||||
}
|
||||
callback(null, output);
|
||||
});
|
||||
|
|
|
@ -12,6 +12,10 @@ contract SimpleStorage {
|
|||
storedData = x;
|
||||
}
|
||||
|
||||
function set2(uint x, uint y) {
|
||||
storedData = x;
|
||||
}
|
||||
|
||||
function get() constant returns (uint retVal) {
|
||||
return storedData;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue