Skip to content

Commit

Permalink
Merge PR larvalabs#81 - fix a couple small things during merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Hall committed Feb 9, 2014
2 parents 5555ccb + 02224b6 commit acdcff1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ app.use(express.static(path.join(__dirname, 'public'), { maxAge: week }));
app.use(function(req, res) {
res.render('404', { status: 404 });
});
app.use(express.errorHandler());
app.use(function(err, req, res, next){
console.error("req: "+req +"\nerror:"+err.stack);
res.statusCode = 500;
res.render('error',{error:err});
});
app.locals.timeago = timeago;

/**
Expand Down
1 change: 1 addition & 0 deletions config/userlist.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
users: [ // ADD YOUR USERNAME AT THE TOP
'd7p',
'kasperlewau',
'kennethrapp',
'briansoule',
Expand Down
13 changes: 13 additions & 0 deletions views/error.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extends ./layout

block content
h1 You broke it :(
h2
| You can help by reporting this or by fixing it, find out how on our <a href="https://github.com/larvalabs/pullup">GitHub page</a>.
p. The stack trace is located in the page source.

.error
.name #{error.name}
.message #{error.message}
//
#{error.stack}

0 comments on commit acdcff1

Please sign in to comment.