mirror of
https://github.com/less/less.js.git
synced 2026-01-23 14:18:00 -05:00
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:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user