brunch/less-brunch — pull request #3 by mlamby (2012-04-15 04:03:11+00:00)
Title: Handle exceptions thrown by the less parser

The less parser will throw exceptions if the code contains a compile error. For example:

```
#header {color: @color;}
```

This will throw the exception ```variable @color is undefined.``` The less-brunch plugin currently does not catch this and will therefore cause the 'brunch watch' process to exit with the message:

```
test/node_modules/less-brunch/node_modules/less/lib/less/parser.js:385
throw new(LessError)(e, env);
^
[object Object]
```

This pull request adds an exception handler that formats the less exception into an error string to be passed to the callback. The 'brunch watch' command will now display the following:

```
15 Apr 13:29:20 - error: LESSCompiler failed in 'style.less' -- NameError:variable @color is undefined in 'style.less:1:16'
```