Skip to content
Myr

refactor errorHandler registration

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 5ec4ea7 · Browse files · 1 file+4 added−19 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+4 added−19 removed

  • other:+4 added−19 removed

1 file+4 added−19 removed

modified:lib/http.js+4 added-19 removed
85 unmodified lines
86 // default production configuration87 this.configure('production', function(){88 this.enable('cache views');89 });90};9092/**93 * Proxy in order to register error handlers.94 */9596Server.prototype.listen = function(){97 this.registerErrorHandlers();98 connect.HTTPServer.prototype.listen.apply(this, arguments);91 // register error handlers on "listening"92 // so that they disregard definition position.93 this.on('listening', this.registerErrorHandlers.bind(this));94};9596/**102 * Proxy in order to register error handlers.103 */104105Server.prototype.listenFD = function(){106 this.registerErrorHandlers();107 connect.HTTPServer.prototype.listenFD.apply(this, arguments);108};109110/**97 * When using the vhost() middleware register error handlers.98 */99100Server.prototype.onvhost = function(){101 this.registerErrorHandlers();102};103104/**119 * Register error handlers. This is automatically120 * called from within `Server#listen()` and `Server#listenFD()`.105 * Register error handlers.106 *107 * @return {Server} for chaining108 * @api public109 */
335 unmodified lines