Better "JavaScript evaluation error" message

Less's messages for JavaScript evaluation errors do not contain the actual error thrown, making them very hard to debug. This PR adds the error message to the log.
This commit is contained in:
Matt Brennan
2013-07-30 16:56:14 +01:00
parent 49888fe606
commit dc45573cf9

View File

@@ -19,7 +19,7 @@ tree.JavaScript.prototype = {
try {
expression = new(Function)('return (' + expression + ')');
} catch (e) {
throw { message: "JavaScript evaluation error: `" + expression + "`" ,
throw { message: "JavaScript evaluation error: " + e.message + " from `" + expression + "`" ,
index: this.index };
}