diff --git a/lib/cmds/scaffolding.js b/lib/cmds/scaffolding.js index 73416d93..57d8ea86 100644 --- a/lib/cmds/scaffolding.js +++ b/lib/cmds/scaffolding.js @@ -1,7 +1,3 @@ -const commandName = "generate-ui"; - -const errorMessage = (message) => new Error(commandName + ": " + message); - class Scaffolding { constructor(embark, options){ this.embark = embark; @@ -28,23 +24,18 @@ class Scaffolding { } }); }); - + if(build === null){ - throw errorMessage("Could not find plugin for framework '" + this.framework + "'"); + throw new Error("Could not find plugin for framework '" + this.framework + "'"); } if(!this.isContract(contractName)){ - return errorMessage("contract '" + contractName + "' does not exist"); + return new Error("contract '" + contractName + "' does not exist"); } const contract = contractConfiguration.contracts[contractName]; - - try { - let result = build(contract); - this.embark.logger.info(result); - } catch(err){ - throw errorMessage(err); - } + const result = build(contract); + this.embark.logger.info(result); } }