Better error reporting

This commit is contained in:
syuilo 2018-05-20 19:24:54 +09:00
parent 05d42b185d
commit 7d6a1e8ef6

View file

@ -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})`);
}); });