diff --git a/lib/index.js b/lib/index.js index 2580803d..936fec6f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -40,10 +40,6 @@ var Embark = { this.config = new Config({env: env}); this.config.loadConfigFiles(options); this.logger = new Logger({logLevel: 'debug'}); - - //this.contractsManager = new ContractsManager(configDir, files, env); - //this.contractsManager.init(); - //return this.contractsManager; }, redeploy: function(env) { @@ -55,7 +51,11 @@ var Embark = { }, self.buildDeployGenerate.bind(self) ], function(err, result) { - self.logger.trace("finished".underline); + if (err) { + self.logger.error(err.message); + } else { + self.logger.trace("finished".underline); + } }); }, @@ -130,12 +130,17 @@ var Embark = { callback(); } ], function(err, result) { - self.logger.setStatus("Ready".green); - self.logger.trace("finished".underline); + if (err) { + self.logger.error(err.message); + } else { + self.logger.setStatus("Ready".green); + self.logger.trace("finished".underline); + } }); }, build: function(env) { + var self = this; async.waterfall([ function deployAndGenerateABI(callback) { Embark.deploy(function(abi) { @@ -148,7 +153,11 @@ var Embark = { callback(); } ], function(err, result) { - self.logger.trace("finished".underline); + if (err) { + self.logger.error(err.message); + } else { + self.logger.trace("finished".underline); + } }); }, @@ -224,6 +233,9 @@ var Embark = { callback(null, abiGenerator.generateABI({useEmbarkJS: true})); } ], function(err, result) { + if (err) { + self.logger.error(err.message); + } done(result); }); },