0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

Exit the process on module load error. (temporary)

This commit is contained in:
Ryan 2009-09-07 14:13:01 +02:00
parent 86051ca5d2
commit 0407145c11

View File

@ -111,6 +111,7 @@ node.Module.prototype.loadObject = function (callback) {
} else {
node.stdio.writeError("Error reading " + self.filename + "\n");
loadPromise.emitError();
node.exit(1);
}
});
return loadPromise;
@ -131,6 +132,7 @@ node.Module.prototype.loadScript = function (callback) {
cat_promise.addErrback(function () {
node.stdio.writeError("Error reading " + self.filename + "\n");
loadPromise.emitError();
node.exit(1);
});
cat_promise.addCallback(function (content) {