mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-30 21:41:46 +01:00
don't log errors twice, #32766
This commit is contained in:
18
src/bootstrap.js
vendored
18
src/bootstrap.js
vendored
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user