diff --git a/lib/application.js b/lib/application.js index 4f3fb91..e7c5a26 100644 --- a/lib/application.js +++ b/lib/application.js @@ -115,7 +115,7 @@ app.context = function(obj){ /** * Return a request handler callback - * for node's native htto server. + * for node's native http server. * * @return {Function} * @api public diff --git a/lib/context.js b/lib/context.js index 5cb1cf3..fda7cdd 100644 --- a/lib/context.js +++ b/lib/context.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ @@ -592,12 +591,12 @@ module.exports = { // handler and log. if (this.headerSent) { err.headerSent = true; - this.app.emit('error', err); + this.app.emit('error', err, this); return; } // delegate - this.app.emit('error', err); + this.app.emit('error', err, this); // err.status support if (err.status) { @@ -915,4 +914,4 @@ function escape(html) { .replace(/"/g, '"') .replace(//g, '>'); -} \ No newline at end of file +}