throw a ParseError, instead of just an Error

This commit is contained in:
cloudhead
2010-02-25 22:49:52 -05:00
parent 543fb96a03
commit b60c296e6e
2 changed files with 7 additions and 3 deletions

View File

@@ -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;
},