From 0060dbe53fb6c07b0a4c7020155aaed2abec63b2 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 26 Feb 2017 14:56:43 -0500 Subject: [PATCH] don't exit if blockchain is not available --- lib/contracts/deploy_manager.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/contracts/deploy_manager.js b/lib/contracts/deploy_manager.js index 4f5eb302..2e2baff7 100644 --- a/lib/contracts/deploy_manager.js +++ b/lib/contracts/deploy_manager.js @@ -34,12 +34,9 @@ DeployManager.prototype.deployContracts = function(done) { web3.setProvider(new web3.providers.HttpProvider(web3Endpoint)); if (!web3.isConnected()) { - console.log(("Couldn't connect to " + web3Endpoint.underline + " are you sure it's on?").red); - console.log("make sure you have an ethereum node or simulator running. e.g 'embark blockchain'".magenta); - // =================================== - // TODO: should throw exception instead - // =================================== - process.exit(); + self.logger.error(("Couldn't connect to " + web3Endpoint.underline + " are you sure it's on?").red); + self.logger.info("make sure you have an ethereum node or simulator running. e.g 'embark blockchain'".magenta); + return callback(Error("error connecting to blockchain node")); } web3.eth.getAccounts(function(err, accounts) {