don't log errors twice, #32766

This commit is contained in:
Johannes Rieken
2017-08-18 11:52:56 +02:00
parent dd06daf898
commit d30567bdd3
2 changed files with 11 additions and 8 deletions

18
src/bootstrap.js vendored
View File

@@ -103,13 +103,15 @@ if (!process.env['VSCODE_ALLOW_IO']) {
process.__defineGetter__('stdin', function () { return writable; });
}
// Handle uncaught exceptions
process.on('uncaughtException', function (err) {
console.error('Uncaught Exception: ', err.toString());
if (err.stack) {
console.error(err.stack);
}
});
if (!process.env['VSCODE_HANDLES_UNCAUGHT_ERRORS']) {
// Handle uncaught exceptions
process.on('uncaughtException', function (err) {
console.error('Uncaught Exception: ', err.toString());
if (err.stack) {
console.error(err.stack);
}
});
}
// Kill oneself if one's parent dies. Much drama.
if (process.env['VSCODE_PARENT_PID']) {
@@ -138,4 +140,4 @@ if (typeof crashReporterOptionsRaw === 'string') {
}
}
require('./bootstrap-amd').bootstrap(process.env['AMD_ENTRYPOINT']);
require('./bootstrap-amd').bootstrap(process.env['AMD_ENTRYPOINT']);