Don't call process.exit() on missing module.
authorRyan Dahl <ry@tinyclouds.org>
Sat, 31 Oct 2009 18:53:07 +0000 (19:53 +0100)
committerRyan Dahl <ry@tinyclouds.org>
Sat, 31 Oct 2009 18:53:09 +0000 (19:53 +0100)
Just raise exception naturally.

src/node.js

index 8fba233..b2f2699 100644 (file)
@@ -323,11 +323,6 @@ function loadModule (request, parent) {
   // This is the promise which is actually returned from require.async()
   var loadPromise = new process.Promise();
 
-  loadPromise.addErrback(function (e) {
-    process.stdio.writeError(e.message + "\n");
-    process.exit(1);
-  });
-
   debug("loadModule REQUEST  " + JSON.stringify(request) + " parent: " + JSON.stringify(parent));
 
   var id, paths;