From 881f79a5719f8c7d68fbfd5208744fd32e2169c3 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Mon, 3 Apr 2017 08:59:28 -0600 Subject: [PATCH] Adjusted error handling --- plugins.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins.js b/plugins.js index 945f6e299..6b506f5aa 100644 --- a/plugins.js +++ b/plugins.js @@ -82,7 +82,13 @@ class PluginSection { try { plugin.module = require(plugin.path); } catch (e) { - throw new Error(`plugin '${plugin.name}' could not be required from '${plugin.path}': ${e.message}`); + if (e && e.code && e.code === 'MODULE_NOT_FOUND' && isInternal(plugin.name)) { + console.error(new Error(`plugin '${plugin.name}' could not be loaded due to missing dependencies, plugin reconsiliation may be required`)); + throw e; + } + + console.error(new Error(`plugin '${plugin.name}' could not be required from '${plugin.path}': ${e.message}`)); + throw e; } if (isInternal(plugin.name)) {