Permalink
Browse files

Exit the process on module load error. (temporary)

  • Loading branch information...
1 parent 86051ca commit 0407145c11ae3bf28ce3d43a087df3bdfadc3f7f @ry ry committed Sep 7, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/node.js
View
@@ -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) {

0 comments on commit 0407145

Please sign in to comment.