From 78c505590256d384cc455c5ae7cac6acf3d07497 Mon Sep 17 00:00:00 2001 From: Cryptomental Date: Mon, 1 Oct 2018 22:55:45 +0200 Subject: [PATCH] contracts_manager, deployment: Emit outputError whenever build error or deployment error happens. Emit outputError when: * contracts cannot be built * contracts cannot be deployed Refs: https://github.com/embark-framework/embark/issues/946 --- lib/modules/contracts_manager/index.js | 1 + lib/modules/deployment/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/modules/contracts_manager/index.js b/lib/modules/contracts_manager/index.js index 922e9f40..137e5b70 100644 --- a/lib/modules/contracts_manager/index.js +++ b/lib/modules/contracts_manager/index.js @@ -296,6 +296,7 @@ class ContractsManager { if (err) { self.compileError = true; self.events.emit("status", __("Compile/Build error")); + self.events.emit("outputError", __("Error building Dapp, please check console")); self.logger.error(__("Error Compiling/Building contracts: ") + err); }else{ self.compileError = false; diff --git a/lib/modules/deployment/index.js b/lib/modules/deployment/index.js index 2b046542..210af369 100644 --- a/lib/modules/deployment/index.js +++ b/lib/modules/deployment/index.js @@ -86,6 +86,7 @@ class DeployManager { if (errors.length) { _err = __("Error deploying contracts. Please fix errors to continue."); self.logger.error(_err); + self.events.emit("outputError", __("Error deploying contracts, please check console")); return done(_err); } if (contracts.length === 0) {