Compare commits

...

1 Commits

Author SHA1 Message Date
Kerkesni d2fcaef506
allow crashing on uncaugh exception 2023-10-10 10:57:26 +02:00
1 changed files with 11 additions and 11 deletions

View File

@ -78,17 +78,17 @@ class S3Server {
process.on('SIGTERM', this.cleanUp.bind(this));
process.on('SIGPIPE', () => { });
// This will pick up exceptions up the stack
process.on('uncaughtException', err => {
// If just send the error object results in empty
// object on server log.
logger.fatal('caught error', {
error: err.message,
stack: err.stack,
workerId: this.worker ? this.worker.id : undefined,
workerPid: this.worker ? this.worker.process.pid : undefined,
});
this.caughtExceptionShutdown();
});
// process.on('uncaughtException', err => {
// // If just send the error object results in empty
// // object on server log.
// logger.fatal('caught error', {
// error: err.message,
// stack: err.stack,
// workerId: this.worker ? this.worker.id : undefined,
// workerPid: this.worker ? this.worker.process.pid : undefined,
// });
// this.caughtExceptionShutdown();
// });
this.started = false;
}