diff --git a/lib/renderer/init.js b/lib/renderer/init.js index bff4ea746ca3..ed0e0e800e62 100644 --- a/lib/renderer/init.js +++ b/lib/renderer/init.js @@ -121,11 +121,7 @@ if (preloadScript) { try { require(preloadScript) } catch (error) { - if (error.code === 'MODULE_NOT_FOUND') { - console.error('Unable to load preload script ' + preloadScript) - } else { - console.error(error) - console.error(error.stack) - } + console.error('Unable to load preload script: ' + preloadScript) + console.error(error.stack || error.message) } }