Bases: Exception
Exception
A goalie check failed.
value (object) – Value that failed the check.
expected (str) – Noun phrase describing what was expected, such as "a non-empty string".
"a non-empty string"
name (str | None) – Name of the argument or variable that holds value.
value
Examples
>>> str(CheckError(1, "a string")) 'Expected a string, got 1.' >>> str(CheckError(1, "a string", name="prefix")) 'prefix must be a string, got 1.'