Cant Modify Immutable Attribute Error¶
cant_modify_immutable_attribute_error
¶
Module for CantModifyImmutableAttributeError exception.
CantModifyImmutableAttributeError
¶
Bases: Error[dict[str, object]]
Raised when there is an attempt to modify an immutable attribute of an object.
Source code in src/forging_blocks/foundation/errors/cant_modify_immutable_attribute_error.py
__init__(class_name: str, attribute_name: str)
¶
Initialise the error with the class and attribute that triggered the violation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
class_name
|
str
|
Name of the class whose immutable attribute was targeted. |
required |
attribute_name
|
str
|
Name of the attribute that was being modified. |
required |