show error message if unable to deploy contracts due to web3 client being unavailable

This commit is contained in:
roo2 2017-03-21 17:33:49 +10:00
parent db5b5eb2de
commit 5fa32754fb
1 changed files with 6 additions and 5 deletions

View File

@ -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;