From 7389dfca5919055d4157360b51f05db2650fae3f Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 19 Mar 2019 20:00:41 +0100 Subject: [PATCH] fix: report module name when require fails in sandboxed renderers (#17413) --- lib/sandboxed_renderer/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sandboxed_renderer/init.js b/lib/sandboxed_renderer/init.js index 1a9088998f8f..6e37445d6a4b 100644 --- a/lib/sandboxed_renderer/init.js +++ b/lib/sandboxed_renderer/init.js @@ -99,7 +99,7 @@ function preloadRequire (module) { if (loadedModules.has(module)) { return loadedModules.get(module) } - throw new Error('module not found') + throw new Error(`module not found: ${module}`) } // Process command line arguments.