Improved recoverFromMismatchedToken method.

Rewrite the recoverFromMismatchedToken method to throw not just one type of exception.