less/less.js — pull request #2312 by ForbesLindesay (2014-11-26 15:15:51+00:00)
Title: Fix double handling of exceptions

This only effects the callback based code path. Consider code like:

```js
less.render(str, options, function (err, res) {
if (err) {
console.log('error handler');
return;
}
throw new Error('Ooops, I made a mistake');
});
```

In the case where less rendering succeeds. This should crash with the error "Ooops, I made a mistake" but instead it logs "error handler" and exists cleanly. This is because the initial error is incorrectly caught by the try catch block and given back to the callback.

This pull request fixes the bug.