Correct the usage of try catch in parser