]> jfr.im git - irc/freenode/jbnc.git/commitdiff
uncaughtException
authorMadriix <redacted>
Fri, 11 Sep 2020 01:53:54 +0000 (03:53 +0200)
committerMadriix <redacted>
Fri, 11 Sep 2020 01:53:54 +0000 (03:53 +0200)
bouncer.js

index 3e71cba7b1b9605a749e489787add79535801483..f14a447943db08fa67222762df2f528aa797fde3 100644 (file)
@@ -52,6 +52,11 @@ process.on('SIGHUP',function() {
   BOUNCER_ADMIN=config.bouncerAdmin?config.bouncerAdmin:'';
 });
 
+// Prevent BNC from crashing for all other users when an error is caused by a user (with log error)
+process.on('uncaughtException', (err, origin) => {
+   console.error(`# Serious problem (${origin}) - this should not happen but the JBNC is still running. ${err.stack}`);
+});
+
 
 // Track IRC (Server) Connections
 var connections={};