Fixed: when using the option -m, objj doesn't process every files in a error is raised, now it does

This commit is contained in:
Alexandre Wilhelm committed 2014-11-05 11:12:17 -08:00
1 parent ad82b0064a
commit 97a65059e5
1 file changed
+17 -1
+17 -1
View File
@@ -123,7 +123,23 @@ exports.run = function(args)
var arg0 = argv.shift();
var mainFilePath = FILE.canonical(arg0);
exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print);
if (multipleFiles)
{
// This is needed to process every files passed in args
// Otherwise it would stop when an error is raised or we would like to objj the other given files
try
{
exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print);
}
catch(e)
{
print("\n" + e);
}
}
else
{
exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print);
}
if (typeof main === "function")
{