dataclass_builder.exceptions module¶
Exceptions for the package.
-
exception
dataclass_builder.exceptions.DataclassBuilderError[source]¶ Bases:
ExceptionBase class of errors raised by
DataclassBuilder.
-
exception
dataclass_builder.exceptions.UndefinedFieldError(message: str, dataclass: Any, field: str)[source]¶ Bases:
dataclass_builder.exceptions.DataclassBuilderErrorException thrown when attempting to assign to an invalid field.
- Parameters
message – Human readable error message
dataclass –
dataclasses.dataclass()theDataclassBuilderwas made for.field – Name of the invalid field that the calling code tried to assign to.
-
dataclass¶ dataclasses.dataclass()theDataclassBuilderwas made for.
-
field¶ Name of the invalid field that the calling code tried to assign to.
-
exception
dataclass_builder.exceptions.MissingFieldError(message: str, dataclass: Any, field: Field[Any])[source]¶ Bases:
dataclass_builder.exceptions.DataclassBuilderErrorThrown when fields are missing when building a
dataclasses.dataclass().- Parameters
message – Human readable error message
dataclass –
dataclasses.dataclass()theDataclassBuilderwas made for.field – The
dataclasses.Fieldrepresenting the missing field that needs to be assigned.
-
dataclass¶ dataclasses.dataclass()theDataclassBuilderwas made for.
-
field¶ The
dataclasses.Fieldrepresenting the missing field that needs to be assigned.