MCPcopy Index your code
hub / github.com/CodeboxIDE/codebox / LessError

Function LessError

core/cb.addons/require-tools/less/lessc.js:280–302  ·  view source on GitHub ↗
(e, env)

Source from the content-addressed store, hash-verified

278 }
279
280 function LessError(e, env) {
281 var input = getInput(e, env),
282 loc = getLocation(e.index, input),
283 line = loc.line,
284 col = loc.column,
285 callLine = e.call && getLocation(e.call, input).line,
286 lines = input.split('\n');
287
288 this.type = e.type || 'Syntax';
289 this.message = e.message;
290 this.filename = e.filename || env.currentFileInfo.filename;
291 this.index = e.index;
292 this.line = typeof(line) === 'number' ? line + 1 : null;
293 this.callLine = callLine + 1;
294 this.callExtract = lines[callLine];
295 this.stack = e.stack;
296 this.column = col;
297 this.extract = [
298 lines[line - 1],
299 lines[line],
300 lines[line + 1]
301 ];
302 }
303
304 LessError.prototype = new Error();
305 LessError.prototype.constructor = LessError;

Callers

nothing calls this directly

Calls 2

getInputFunction · 0.85
getLocationFunction · 0.85

Tested by

no test coverage detected