Raise an error if parsing fails