Skip to content
Myr

only register error handlers once

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent e562adc · Browse files · 1 file+2 added−0 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+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:lib/express/server.js+2 added
110 unmodified lines
111 * @api public112 */113114Server.prototype.registerErrorHandlers = function(){115 if (this.registeredErrorHandlers) return this;116 this.registeredErrorHandlers = true;117 this.errorHandlers.forEach(function(fn){118 this.use(function(err, req, res, next){119 fn.apply(this, arguments);120 });
247 unmodified lines