From 0bb21ab3975c78c2aae1ff010a668bd938ee4845 Mon Sep 17 00:00:00 2001 From: Darren Date: Fri, 2 Nov 2012 20:49:04 +0000 Subject: [PATCH] Server: Uncaught exception handler --- server/kiwi.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/kiwi.js b/server/kiwi.js index 30031a9..39edb39 100755 --- a/server/kiwi.js +++ b/server/kiwi.js @@ -129,6 +129,12 @@ if ((global.config.user) && (global.config.user !== '')) { } +// Make sure Kiwi doesn't simply quit on an exception +process.on('uncaughtException', function (e) { + console.log('[Uncaught exception] ' + e); +}); + + process.on('SIGUSR1', function() { if (config.loadConfig()) { console.log('New config file loaded'); -- 2.25.1