From: Darren Date: Fri, 2 Nov 2012 20:49:04 +0000 (+0000) Subject: Server: Uncaught exception handler X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0bb21ab3975c78c2aae1ff010a668bd938ee4845;p=KiwiIRC.git Server: Uncaught exception handler --- 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');