fix: improve wording on contract constructor failing

This commit is contained in:
Andre Medeiros 2019-04-22 10:37:56 -04:00 committed by Iuri Matias
parent 7a76516534
commit ea7ae22501
1 changed files with 3 additions and 2 deletions

View File

@ -73,9 +73,10 @@ class DeployManager {
self.events.request('deploy:contract', contract, (err) => { self.events.request('deploy:contract', contract, (err) => {
if (err) { if (err) {
contract.error = err.message || err; contract.error = err.message || err;
self.logger.error(`[${contract.className}]: ${err.message || err}`);
if (contract.error === constants.blockchain.gasAllowanceError) { if (contract.error === constants.blockchain.gasAllowanceError) {
self.logger.error(constants.blockchain.gasAllowanceErrorMessage); self.logger.error(`[${contract.className}]: ${constants.blockchain.gasAllowanceErrorMessage}`);
} else {
self.logger.error(`[${contract.className}]: ${err.message || err}`);
} }
errors.push(err); errors.push(err);
} }