Log errors in preload script instead of rethrowing
At some point, unhandled errors in preload scripts stopped being logged to console, meaning that preload scripts were very difficult to debug. Instead, print the error to console (which is what we wanted to have happen anyways)
This commit is contained in:
parent
4608f5e9cd
commit
e2ec50173f
1 changed files with 5 additions and 2 deletions
|
@ -103,5 +103,8 @@ if preloadScript
|
|||
try
|
||||
require preloadScript
|
||||
catch error
|
||||
throw error unless error.code is 'MODULE_NOT_FOUND'
|
||||
console.error "Unable to load preload script #{preloadScript}"
|
||||
if error.code is 'MODULE_NOT_FOUND'
|
||||
console.error "Unable to load preload script #{preloadScript}"
|
||||
else
|
||||
console.error(error)
|
||||
console.error(error.stack)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue