mirror of https://github.com/nodejs/node.git
Exit the process on module load error. (temporary)
parent
86051ca5d2
commit
0407145c11
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue