Always throw real ParseErrors

Also sneak in a colon.

Auditors: emily
This commit is contained in:
Ben Alpert
2013-07-28 17:53:48 -07:00
parent 3b69354fd6
commit cab5af40b6
3 changed files with 5 additions and 4 deletions

View File

@@ -152,7 +152,8 @@ var buildGroup = function(style, color, group, prev) {
} else if (group.type === "namedfn") {
return makeSpan("mop" + color, [textit(group.value.slice(1))]);
} else {
throw "Lex error: Got group of unknown type: '" + group.type + "'";
throw new ParseError(
"Lex error: Got group of unknown type: '" + group.type + "'");
}
};