master
Keith Irwin 2016-04-28 03:32:44 +00:00
parent 8d386818a2
commit f81651abdf
1 changed files with 9 additions and 9 deletions

View File

@ -72,20 +72,20 @@ app.use('/static', express.static(__dirname+'/static'));
// Handle errors // Handle errors
if (secret.url=='https://tracman.org') { // if (secret.url=='https://tracman.org') {
// var handle404 = function(err,req,res,next) { // var handle404 = function(err,req,res,next) {
// if (err) { console.log('404 handling error: '+err); } // if (err) { console.log('404 handling error: '+err); }
// res.render('error.html', {code:404}); // res.render('error.html', {code:404});
// }; // };
var handle500 = function(err,req,res,next) { // var handle500 = function(err,req,res,next) {
if (err) { console.log('500 handling error: '+err); } // if (err) { console.log('500 handling error: '+err); }
res.render('error.html', {code:500}); // res.render('error.html', {code:500});
}; // };
// app.use(crash.handle404(handle404)); // app.use(crash.handle404(handle404));
app.use(crash.handle500(handle500)); // app.use(crash.handle500(handle500));
crash.trapRoute(app); // crash.trapRoute(app);
crash.handle(app, /*handle404,*/ handle500); // crash.handle(app, handle404, handle500);
} // }
/* RUNTIME */ /* RUNTIME */