mirror of
https://github.com/less/less.js.git
synced 2026-02-09 06:25:24 -05:00
throw a ParseError, instead of just an Error
This commit is contained in:
@@ -150,7 +150,7 @@ less.parser = {
|
||||
zone = stylize(input.slice(start, i), 'green') +
|
||||
stylize(input.slice(i, end), 'yellow');
|
||||
|
||||
throw new(Error)("Parse Error on line " + line + ":\n" + zone);
|
||||
throw { name: "ParseError", message: "Parse Error on line " + line + ":\n" + zone };
|
||||
}
|
||||
return tree;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user