🎨 Use the same stack trace for both cases

This commit is contained in:
Bruno Queiros 2016-05-18 19:02:42 -03:00
parent 06e3e65c1b
commit 046cb0df8d

View file

@ -121,11 +121,7 @@ if (preloadScript) {
try {
require(preloadScript)
} catch (error) {
if (error.code === 'MODULE_NOT_FOUND' && error.message.indexOf(preloadScript) > -1) {
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)
}
}