Commit 988307f6 988307f6cb6b6549356110445d133d655ca5a12a by Nicolas Perriault

fixed missing file location information on syntax error on a required file

1 parent ce868249
Showing 1 changed file with 3 additions and 2 deletions
......@@ -162,9 +162,10 @@ if (!phantom.casperLoaded) {
return requireCache[file].exports;
}
try {
new Function('module', 'exports', phantom.getScriptCode(file))(module, module.exports);
var scriptCode = phantom.getScriptCode(file);
new Function('module', 'exports', scriptCode)(module, module.exports);
} catch (e) {
phantom.processScriptError(e);
phantom.processScriptError(e, file);
}
requireCache[file] = module;
return module.exports;
......