(e, env)
| 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; |
nothing calls this directly
no test coverage detected