duncansmart/less.js-windows — pull request #14 by ahem (2012-03-30 15:08:01+00:00)
Title: Error reporting bug

I discovered a bug in the output from the lessc.wsf wrapper, and I made this fix for it.

In short, sometimes less.js would not throw errors or return them through the callback, but instead add them to some kind of error-reporting html element that it would get with document.getElementById. I have added a testcase, but basically, if you have to files:

incorrect.less:
```
#globalfooter {
.footer-search input#footer-submit {
top: 21px;
box.shadow: none;
}
}
```

import-incorrect.less:
```
@import "incorrect";
```

Then ```lessc incorrect.less``` would fail as expected:

```
ERR:
type: Parse
message: Syntax Error on line 5
index: 85
filename: incorrect.less
line: 5
column: 8
extract: top: 21px;, box.shadow: none;, }
```

But ```lessc import-incorrect.less``` would silently fail without doing anything. I added a small check at the end of the wrapperscript to check if and error have been stored inside the dummy element, and if there is one, report it and exit with an error code. It seems to work.

I also upgraded less to the newest version (1.3.0).

You can merge it if you like to, and in any case thank you for a very useful tool :-)