From 0de9ccd05221e3c0e11e4945a7ec5d51b174f702 Mon Sep 17 00:00:00 2001 From: Daniel Ventura Date: Mon, 21 Nov 2022 13:59:21 +0000 Subject: [PATCH] #296 dividing logic try catch in order to make each one do a different thing --- copado-function/app/Init.fn.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/copado-function/app/Init.fn.js b/copado-function/app/Init.fn.js index 303c67f..c6e03f6 100644 --- a/copado-function/app/Init.fn.js +++ b/copado-function/app/Init.fn.js @@ -127,9 +127,18 @@ async function run() { Log.info('==================='); Log.info(''); Util.provideMCDevTools(); + } catch (ex) { + Log.error('Preparing failed: ' + ex.message); + throw ex; + } + try { + Log.info(''); + Log.info('Initializing mcdev tools'); + Log.info('==================='); + Log.info(''); Copado.mcdevInit(CONFIG.credentials, CONFIG.credentialNameSource, CONFIG.repoUrl); } catch (ex) { - Log.error('initializing failed: ' + ex.message); + Log.error('Initializing failed: ' + ex.message); throw ex; }