diff --git a/lib/cli/run-helpers.js b/lib/cli/run-helpers.js index ec65829f14..f838ba0e86 100644 --- a/lib/cli/run-helpers.js +++ b/lib/cli/run-helpers.js @@ -284,8 +284,8 @@ exports.validateLegacyPlugin = (opts, pluginType, map = {}) => { // Try to load reporters from a cwd-relative path try { map[pluginId] = require(path.resolve(pluginId)); - } catch (e) { - throw createUnknownError(e); + } catch (err) { + throw createUnknownError(err); } } } diff --git a/lib/cli/watch-run.js b/lib/cli/watch-run.js index 6d5c6c26a7..644f79d3be 100644 --- a/lib/cli/watch-run.js +++ b/lib/cli/watch-run.js @@ -270,8 +270,8 @@ const createRerunner = (mocha, watcher, {beforeRun} = {}) => { console.error(`${logSymbols.info} [mocha] waiting for changes...`); } }); - } catch (e) { - console.error(e.stack); + } catch (err) { + console.error(err.stack); } }; diff --git a/lib/mocha.js b/lib/mocha.js index c6ee248561..7e7c7d33f1 100644 --- a/lib/mocha.js +++ b/lib/mocha.js @@ -344,8 +344,8 @@ Mocha.prototype.reporter = function (reporterName, reporterOptions) { // Try to load reporters from a cwd-relative path try { reporter = require(path.resolve(reporterName)); - } catch (e) { - throw createInvalidReporterError(e.message, reporterName); + } catch (err) { + throw createInvalidReporterError(err.message, reporterName); } } }