The change seems like a good start, for internal errors in general. IMHO, using error...
MismatchedTokenException crash on parse error
OneTopLevelClass check class should not allow specifying tokens