From 4a947d4783283ec756cd07a37d56f7d959cefaf4 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Wed, 12 Sep 2018 09:00:20 -0400 Subject: [PATCH] Show an error message on account parameters --- lib/modules/deployment/contract_deployer.js | 2 +- lib/modules/deployment/index.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/modules/deployment/contract_deployer.js b/lib/modules/deployment/contract_deployer.js index d46d10a7a..db634d46f 100644 --- a/lib/modules/deployment/contract_deployer.js +++ b/lib/modules/deployment/contract_deployer.js @@ -38,7 +38,7 @@ class ContractDeployer { const match = arg.match(/\$accounts\[([0-9]+)]/); if (match) { if (!accounts[match[1]]) { - return cb(__('No corresponding account at index $d', match[1])); + return cb(__('No corresponding account at index %d', match[1])); } return cb(null, accounts[match[1]]); } diff --git a/lib/modules/deployment/index.js b/lib/modules/deployment/index.js index 8c6445d47..3ab3f127a 100644 --- a/lib/modules/deployment/index.js +++ b/lib/modules/deployment/index.js @@ -75,8 +75,12 @@ class DeployManager { async.auto(contractDeploys, function(err, _results) { if (err) { self.logger.error(__("error deploying contracts")); - self.logger.error(err.message); - self.logger.debug(err.stack); + if(err.message !== undefined) { + self.logger.error(err.message); + self.logger.debug(err.stack); + } else { + self.logger.error(err); + } } if (contracts.length === 0) { self.logger.info(__("no contracts found"));