emberfeather/less.js-middleware — pull request #15 by jbuck (2012-10-02 15:22:46+00:00)
Title: Always report LESS parse errors

If you have an error in your LESS file, the console will print out:

```
TypeError: Cannot call method 'toCSS' of undefined
at module.exports.less.middleware.options.render (/Users/jon/Dropbox/Sites/butter/node_modules/less-middleware/lib/middleware.js:139:22)
at Object.less.Parser.parser.parse (/Users/jon/Dropbox/Sites/butter/node_modules/less/lib/less/parser.js:332:24)
at Object.module.exports.less.middleware.options.render (/Users/jon/Dropbox/Sites/butter/node_modules/less-middleware/lib/middleware.js:138:12)
at module.exports.less.middleware.compile (/Users/jon/Dropbox/Sites/butter/node_modules/less-middleware/lib/middleware.js:197:21)
at fs.readFile (fs.js:176:14)
at Object.oncomplete (fs.js:297:15)
```

This is because the default LESS parser callback does not check for `err` before trying to convert the tree to CSS.

I also changed the log function to always log error messages. It looks like that used to be the default from issue #8 and issue #12, but it was removed.