Skip to content

Commit

Permalink
Add handler for uncaughtException
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis committed Jun 7, 2011
1 parent 31ba026 commit bc4c283
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ var zkclient = new ZkClient("localhost:2181");
var users = JSON.parse(fs.readFileSync(path.join(__dirname,'user.json'), 'utf8'));
var app = module.exports = express.createServer();

process.on('uncaughtException', function (err) {
console.error('Caught exception: ' + err);
});


// Configuration
app.configure(function(){
app.set('views', __dirname + '/views');
Expand Down

0 comments on commit bc4c283

Please sign in to comment.