visionmedia/express — pull request #1446 by thlorenz (2012-12-14 02:26:59+00:00)
Title: ensuring that all callbacks passed to Router#route are functions and are defined

Currently express does not check passed callbacks for problems, which can result in bugs that are very hard to track down e.g.,:

```js
var validate = require('./validate');

// Oops - misspelled hasCorrectParams
app.get('/foo', validate.hasCorectParams, function (req, res) {
// ...
});
```

I adapted `Router#route` to throw an error if any of the passed callbacks are `null`, `undefined` or not a `function` in order to give immediate feedback for these kind of bugs.