diff --git a/lib/deploy.js b/lib/deploy.js index e5382ac05..9731a28a1 100644 --- a/lib/deploy.js +++ b/lib/deploy.js @@ -123,8 +123,12 @@ Deploy.prototype.deployContract = function(contract, params, callback) { if (err) { self.logger.error("error deploying contract: " + contract.className); - self.logger.error(err.toString()); - contract.error = err.toString(); + var errMsg = 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)); } else if (transaction.address !== undefined) { self.logger.info(contract.className + " deployed at " + transaction.address);