lesson5:throw exception when parsing fails