Throw exception when parsing fails