fix throw LogicException