mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 22:33:09 +02:00
Better error reporting
This commit is contained in:
parent
684a8531b6
commit
8bb97f2e4c
1 changed files with 8 additions and 3 deletions
11
src/index.ts
11
src/index.ts
|
@ -194,7 +194,12 @@ cluster.on('exit', worker => {
|
||||||
// Display detail of unhandled promise rejection
|
// Display detail of unhandled promise rejection
|
||||||
process.on('unhandledRejection', console.dir);
|
process.on('unhandledRejection', console.dir);
|
||||||
|
|
||||||
// Dying away...
|
// Display detail of uncaught exception
|
||||||
process.on('exit', () => {
|
process.on('uncaughtException', err => {
|
||||||
Logger.info('The process is going exit');
|
console.error(err);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Dying away...
|
||||||
|
process.on('exit', code => {
|
||||||
|
Logger.info(`The process is going exit (${code})`);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue