From a245f08e75a51242cf685b2fb754972e4b139769 Mon Sep 17 00:00:00 2001 From: Webber Date: Fri, 22 May 2020 01:24:22 +0200 Subject: [PATCH] rename to throwContextualError --- src/model/system.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/model/system.js b/src/model/system.js index 8fafa688..23faf50a 100644 --- a/src/model/system.js +++ b/src/model/system.js @@ -33,7 +33,7 @@ class System { } }; - const throwErrorShowing = (message) => { + const throwContextualError = (message) => { let commandAsString = command; if (Array.isArray(arguments_)) { commandAsString += ` ${arguments_.join(' ')}`; @@ -48,11 +48,11 @@ class System { const exitCode = await exec(command, arguments_, { silent: true, listeners, ...options }); showOutput(); if (exitCode !== 0) { - throwErrorShowing(`Command returned non-zero exit code.\nError: ${error}`); + throwContextualError(`Command returned non-zero exit code.\nError: ${error}`); } } catch (inCommandError) { showOutput(); - throwErrorShowing(`In-command error caught: ${inCommandError}`); + throwContextualError(`In-command error caught: ${inCommandError}`); } return result;