diff --git a/lib/less/parser.js b/lib/less/parser.js index fd6b1c7d..41d79f11 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -309,11 +309,12 @@ less.Parser = function Parser(env) { } } if (level > 0) { - throw { - type: 'Syntax', - message: "Missing closing `}`", + return callback(new(LessError)({ + index: i, + type: 'Parse', + message: "missing closing `}`", filename: env.filename - }; + }, env)); } return chunks.map(function (c) { return c.join('') });;