From 2297c06fcea21cf02d7c63a58118be0ee5194e27 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Jan 2017 08:04:17 +0900 Subject: [PATCH] [Server] Improve: Display detail of unhandled promise rejection --- src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.ts b/src/index.ts index 014488795..1083ac5c6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -182,6 +182,9 @@ function spawnWorkers(onComplete: any): void { }); } +// Display detail of unhandled promise rejection +process.on('unhandledRejection', console.dir); + // Dying away... process.on('exit', () => { Logger.info('The process is going exit');