clarify gas amount msg

This commit is contained in:
Iuri Matias 2016-10-22 11:48:47 -04:00
parent ae3bcb1060
commit bcdba3f8bc
1 changed files with 6 additions and 2 deletions

View File

@ -123,8 +123,12 @@ Deploy.prototype.deployContract = function(contract, params, callback) {
if (err) { if (err) {
self.logger.error("error deploying contract: " + contract.className); self.logger.error("error deploying contract: " + contract.className);
self.logger.error(err.toString()); var errMsg = err.toString();
contract.error = err.toString(); if (errMsg === 'The contract code couldn\'t be stored, please check your gas amount.') {
errMsg = 'The contract code couldn\'t be stored, this could be due to the gas amount or an error in the contract constructor code';
}
self.logger.error(errMsg);
contract.error = errMsg;
callback(new Error(err)); callback(new Error(err));
} else if (transaction.address !== undefined) { } else if (transaction.address !== undefined) {
self.logger.info(contract.className + " deployed at " + transaction.address); self.logger.info(contract.className + " deployed at " + transaction.address);