Catch lexer and parser errors.