Merge pull request #815 from embark-framework/fix-invalid-account-param-error

Show an error message on account parameters
This commit is contained in:
Jonathan Rainville 2018-09-12 10:01:55 -04:00 committed by GitHub
commit 52a99ee4ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -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]]);
}

View File

@ -75,8 +75,12 @@ class DeployManager {
async.auto(contractDeploys, function(err, _results) {
if (err) {
self.logger.error(__("error deploying contracts"));
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"));