Skip to content
Myr

Refactoring routing slightly

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 6d6e155 · Browse files · 1 file+7 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−7 removed

  • other:+7 added−7 removed

1 file+7 added−7 removed

modified:lib/express/core.js+7 added-7 removed
262 unmodified lines
263 * @api private264 */265 266 route: function(request, response){267 request = new Request(request, response) 268 var self= this;269 request.trigger('request', null, function(error) { 270 if (request.response.finished) return267 var self = this,268 request = new Request(request, response) 269 request.trigger('request', null, function(e) {270 try {271 if (e) throw e272 if (request.response.finished) return273 if (typeof (body = (new Router(request)).route()) === 'string')274 request.halt(200, body) 274 }275 catch (e) {275 } catch (e) {276 self.error(e, request)277 }278 });278 })279 },280 281 /**282 * Handle errors.
55 unmodified lines