goalie.CheckValueError¶
- exception goalie.CheckValueError(value: object, expected: str, name: str | None = None)¶
Bases:
CheckError,ValueErrorA value has the right type but an unacceptable value.
Examples
>>> try: ... raise CheckValueError("red", "a hex color code", name="color") ... except ValueError as e: ... str(e) "color must be a hex color code, got 'red'."