Changed Exception to ValueError.