Print error when "preload" script is not found

This commit is contained in:
Cheng Zhao 2014-11-06 16:12:40 +08:00
parent 111dcbac25
commit f90fb8cc72

View file

@ -90,4 +90,9 @@ else
delete global.clearImmediate
# Load the script specfied by the "preload" attribute.
require preloadScript if preloadScript
if preloadScript
try
require preloadScript
catch error
throw error unless error.code is 'MODULE_NOT_FOUND'
console.error "Unable to load preload script #{preloadScript}"