handle error on contract deplyoment

This commit is contained in:
Iuri Matias 2016-10-30 19:22:09 -04:00
parent ac67c80576
commit e44bd3a22e
1 changed files with 3 additions and 0 deletions

View File

@ -79,6 +79,9 @@ Deploy.prototype.checkAndDeployContract = function(contract, params, callback) {
} }
this.deployContract(contract, realArgs, function(err, address) { 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.trackContract(contract.className, contract.code, realArgs, address);
self.deployTracker.save(); self.deployTracker.save();
self.logger.contractsState(self.contractsManager.contractsState()); self.logger.contractsState(self.contractsManager.contractsState());