debugger: add uncaughtException handler to kill child

This commit is contained in:
Ryan Dahl 2011-01-13 15:18:13 -08:00
parent 0fa3f2febd
commit 53f29d86c0

View File

@ -7,6 +7,14 @@ exports.port = 5858;
exports.start = function() {
var interface = new Interface();
process.on('uncaughtException', function (e) {
console.error("There was an internal error in Node's debugger. " +
"Please report this bug.");
console.error(e.message);
console.error(e.stack);
if (interface.child) interface.child.kill();
process.exit(1);
});
};