Exit the process on module load error. (temporary)

pull/5370/head
Ryan 2009-09-07 14:13:01 +02:00
parent 86051ca5d2
commit 0407145c11
1 changed files with 2 additions and 0 deletions

View File

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