Don't call process.exit() on missing module.

Just raise exception naturally.
This commit is contained in:
Ryan Dahl 2009-10-31 19:53:07 +01:00
parent f683867b98
commit 9a7321ebb0

View 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;