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:
parent
86051ca5d2
commit
0407145c11
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user