Skip to content

Commit

Permalink
handle global exceptions (let's hope they don't come from node-syslog)
Browse files Browse the repository at this point in the history
  • Loading branch information
till committed Jan 16, 2012
1 parent 149de1f commit 7f67b46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ var globalstats = {
}
};

process.on('uncaughtException', function (err) {
syslog.log(syslog.LOG_ERR, 'Caught exception: ' + err);
});

config.configFile(process.argv[2], function (config, oldConfig) {
function graphServiceIs(name){
return (config.graphService) && (config.graphService == name);
Expand Down

0 comments on commit 7f67b46

Please sign in to comment.