diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-20 19:24:54 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-20 19:24:54 +0900 |
| commit | 8bb97f2e4c8e645358efb688bee116bd017f55b8 (patch) | |
| tree | 976e07d9a3a0c4c404a9d8531a4c26316b37521e /src | |
| parent | 2.12.0 (diff) | |
| download | sharkey-8bb97f2e4c8e645358efb688bee116bd017f55b8.tar.gz sharkey-8bb97f2e4c8e645358efb688bee116bd017f55b8.tar.bz2 sharkey-8bb97f2e4c8e645358efb688bee116bd017f55b8.zip | |
Better error reporting
Diffstat (limited to 'src')
| -rw-r--r-- | src/index.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/index.ts b/src/index.ts index d633fcbbcb..bcd6561691 100644 --- a/src/index.ts +++ b/src/index.ts @@ -194,7 +194,12 @@ cluster.on('exit', worker => { // Display detail of unhandled promise rejection process.on('unhandledRejection', console.dir); +// Display detail of uncaught exception +process.on('uncaughtException', err => { + console.error(err); +}); + // Dying away... -process.on('exit', () => { - Logger.info('The process is going exit'); +process.on('exit', code => { + Logger.info(`The process is going exit (${code})`); }); |