1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-02 16:58:43 +09:00

Better error reporting

This commit is contained in:
syuilo 2018-05-20 19:24:54 +09:00
parent 684a8531b6
commit 8bb97f2e4c

View File

@ -194,7 +194,12 @@ cluster.on('exit', worker => {
// Display detail of unhandled promise rejection
process.on('unhandledRejection', console.dir);
// Dying away...
process.on('exit', () => {
Logger.info('The process is going exit');
// Display detail of uncaught exception
process.on('uncaughtException', err => {
console.error(err);
});
// Dying away...
process.on('exit', code => {
Logger.info(`The process is going exit (${code})`);
});