Server: Uncaught exception handler
authorDarren <darren@darrenwhitlen.com>
Fri, 2 Nov 2012 20:49:04 +0000 (20:49 +0000)
committerDarren <darren@darrenwhitlen.com>
Fri, 2 Nov 2012 20:49:04 +0000 (20:49 +0000)
server/kiwi.js

index 30031a9e01577b134f797ef7636a6723764d0cb9..39edb397d81d4d9f3b9b1d39cf938ec6a05e1390 100755 (executable)
@@ -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');