From 229856d51420279ce061f4bf622320e57c4b91a5 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Tue, 28 Feb 2012 18:06:22 +0100 Subject: [PATCH] fix error message on wrong-arity call --- lib/less/parser.js | 4 ++-- lib/less/tree/mixin.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/less/parser.js b/lib/less/parser.js index 66ce02580..1c5ec3459 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -228,8 +228,8 @@ less.Parser = function Parser(env) { this.filename = e.filename || env.filename; this.index = e.index; this.line = typeof(line) === 'number' ? line + 1 : null; - this.callLine = e.call && (getLocation(e.call, input) + 1); - this.callExtract = lines[getLocation(e.call, input)]; + this.callLine = e.call && (getLocation(e.call, input).line + 1); + this.callExtract = lines[getLocation(e.call, input).line]; this.stack = e.stack; this.column = col; this.extract = [ diff --git a/lib/less/tree/mixin.js b/lib/less/tree/mixin.js index 2add51654..81fccd1a6 100644 --- a/lib/less/tree/mixin.js +++ b/lib/less/tree/mixin.js @@ -22,7 +22,7 @@ tree.mixin.Call.prototype = { rules, mixins[m].eval(env, this.arguments, this.important).rules); match = true; } catch (e) { - throw { message: e.message, index: e.index, filename: this.filename, stack: e.stack, call: this.index }; + throw { message: e.message, index: this.index, filename: this.filename, stack: e.stack }; } } }