Skip to content

Commit 12a487b

Browse files
authored
Merge pull request #32 from Madriix/master
uncaughtException
2 parents 81bb977 + 23536b5 commit 12a487b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bouncer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ process.on('SIGHUP',function() {
5252
BOUNCER_ADMIN=config.bouncerAdmin?config.bouncerAdmin:'';
5353
});
5454

55+
// Prevent BNC from crashing for all other users when an error is caused by a user (with log error)
56+
process.on('uncaughtException', (err, origin) => {
57+
console.error(`# Serious problem (${origin}) - this should not happen but the JBNC is still running. ${err.stack}`);
58+
});
59+
5560

5661
// Track IRC (Server) Connections
5762
var connections={};

0 commit comments

Comments
 (0)