Skip to content
Myr

Caching notFound / showException modules

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

authored by visionmedia · committed by visionmedia · parent b5c0fdc · Browse files · 1 file+5 added−6 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+5 added−6 removed

  • other:+5 added−6 removed

1 file+5 added−6 removed

modified:lib/express/core.js+5 added-6 removed
3 unmodified lines
4/**5 * Module dependencies.6 */78var showExceptions = require('express/pages/show-exceptions'),9 notFound = require('express/pages/not-found'),8var multipart = require('multipart'),10 multipart = require('multipart'),11 utils = require('express/utils'),12 events = require('events'),13 fs = require('fs')14
104 unmodified lines
119 }120 return body121 }122 else if (this.request.accepts('html') && set('helpful 404'))121 this.request.halt(404, require('express/pages/not-found').render(this.request))123 this.request.halt(404, notFound.render(this.request))124 else125 this.request.halt()126 },127
192 unmodified lines
320 * @api private321 */322 323Express.error = function (err, request, response) {322 if (!(request instanceof Request))323 request = new Request(request, response),324 request.trigger('request')324 if (request.accepts('html') && set('show exceptions'))326 request.halt(500, require('express/pages/show-exceptions').render(request, err))325 request.halt(500, showExceptions.render(request, err))326 else327 request.halt(500)328 if (set('throw exceptions'))329 throw err
25 unmodified lines