From 5fa32754fb64dc46bc33a5cb4942281d1c44381d Mon Sep 17 00:00:00 2001 From: roo2 Date: Tue, 21 Mar 2017 17:33:49 +1000 Subject: [PATCH] show error message if unable to deploy contracts due to web3 client being unavailable --- lib/index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/index.js b/lib/index.js index 7037f224..015768c8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -104,7 +104,7 @@ var Embark = (function () { }); }); - engine.deployManager.deployContracts(function() { + engine.deployManager.deployContracts(function(err) { engine.startService("fileWatcher"); if (options.runWebserver) { engine.startService("webServer", { @@ -112,12 +112,13 @@ var Embark = (function () { port: options.serverPort }); } - callback(); + callback(err); }); } ], function(err, result) { if (err) { engine.logger.error(err.message); + engine.logger.info(err.stack); } else { engine.logger.setStatus("Ready".green); engine.logger.info("Looking for documentation? you can find it at ".cyan + "http://embark.readthedocs.io/".green.underline); @@ -149,13 +150,14 @@ var Embark = (function () { callback(); }, function deploy(callback) { - engine.deployManager.deployContracts(function() { - callback(); + engine.deployManager.deployContracts(function(err) { + callback(err); }); } ], function(err, result) { if (err) { engine.logger.error(err.message); + engine.logger.debug(err.stack) } else { engine.logger.info("finished building".underline); } @@ -198,4 +200,3 @@ var Embark = (function () { })(); module.exports = Embark; -