diff --git a/lib/deploy.js b/lib/deploy.js index 5700f0a15..f048217c7 100644 --- a/lib/deploy.js +++ b/lib/deploy.js @@ -79,6 +79,9 @@ Deploy.prototype.checkAndDeployContract = function(contract, params, callback) { } this.deployContract(contract, realArgs, function(err, address) { + if (err) { + return callback(new Error(err)); + } self.deployTracker.trackContract(contract.className, contract.code, realArgs, address); self.deployTracker.save(); self.logger.contractsState(self.contractsManager.contractsState());