Changed the flow of exception handling in the parser.