From 72f7fa6077155caf31aa71a550bcb7c52e926630 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Mon, 16 Jan 2012 14:59:00 +0100 Subject: [PATCH] fix 'missing }' error message --- lib/less/parser.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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('') });;