Add the exception handler for the parser.

As the Tiltle. It seem like there are something wrong with the parser or the rules.