Put the arguments the right way around in emitter.

This commit is contained in:
Phil Jackson 2013-09-10 23:41:09 +01:00 committed by indexzero
parent 25bb3bfa70
commit 7c8ecc8ea8

View File

@ -294,7 +294,7 @@ exports.stack = function stack (middlewares, proxy) {
handle = function (req, res) { handle = function (req, res) {
var next = function (err) { var next = function (err) {
if (err) { if (err) {
if (! proxy.emit('middlewareError', err, res, req)) { if (! proxy.emit('middlewareError', err, req, res)) {
console.error('Error in middleware(s): %s', err.stack); console.error('Error in middleware(s): %s', err.stack);
} }