ft3.objects.exc module

Objects exceptions module.

exception FieldAnnotationError

Bases: BasePackageException[str, type[Any] | ForwardRef | None]

Incomplete type annotation.

exception IncorrectCasingError(fields: Iterable[str])

Bases: BasePackageException[Iterable[str]]

Incorrect field casing.

exception IncorrectDefaultTypeError(name: str, dtype: type[Any], value: Any)

Bases: BasePackageException[str, type[Any], Any]

Error raised when a field’s default value is not of an allowed type.

exception IncorrectTypeError(name: str, dtype: Any, value: Any)

Bases: BasePackageException[str, Any, Any]

Error raised when a field value is not of an allowed type.

exception InvalidComparisonTypeError(name: str, dtype: Any, value: Any)

Bases: BasePackageException[str, Any, Any]

Error raised when comparing a field with a value of a different type.

exception InvalidContainerComparisonTypeError(name: str, dtype: Any, value: Any)

Bases: BasePackageException[str, Any, Any]

Error raised when checking for membership or similarity against a non-Iterable field.

exception InvalidFieldAdditionError(name: str)

Bases: BasePackageException[str]

Cannot add new fields after a class has already been defined.

exception InvalidFieldRedefinitionError(name: str)

Bases: BasePackageException[str]

Cannot redefine field for the same key with a different name.

exception InvalidObjectComparisonError(obj: Any, other: Any)

Bases: BasePackageException[Any, Any]

Error raised when comparing an object with another with differing fields.

exception MissingTypeAnnotation(name: str)

Bases: BasePackageException[str]

Incomplete type annotation.

exception ReservedKeywordError(name: str)

Bases: BasePackageException[str]

Invalid keyword.

exception TypeValidationError(name: str, dtype: Any, error_ref: ParseErrorRef)

Bases: BasePackageException[str, Any, ParseErrorRef]

Error raised when a field value could not be parsed as valid type.

exception BasePackageException(msg: str, *args: Unpack[ArgsType])

Bases: BaseException, Generic[Unpack[ArgsType]]

Exception common to the entire package.

Automatically handles serialization.