input4mips_validation.validation.exceptions#
input4mips_validation.validation.exceptions
#
Exceptions related to validation that don't obviously fit elsewhere
FileAssociatedWithDatabaseEntryError
#
Bases: ValueError
Raised when the file associated with a database entry has a problem
Source code in src/input4mips_validation/validation/exceptions.py
__init__(entry, error_container)
#
Initialise the error
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entry
|
Input4MIPsDatabaseEntryFile
|
The entry we tried to validate |
required |
error_container
|
list[tuple[str, Exception]]
|
The thing which was being done and the error which was caught while validating the file. |
required |
Source code in src/input4mips_validation/validation/exceptions.py
InvalidFileError
#
Bases: ValueError
Raised when a file does not pass all of the validation
Source code in src/input4mips_validation/validation/exceptions.py
__init__(filepath, error_container)
#
Initialise the error
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
Path | str
|
The filepath we tried to validate |
required |
error_container
|
list[tuple[str, Exception]]
|
The thing which was being done and the error which was caught while validating the file. |
required |
Source code in src/input4mips_validation/validation/exceptions.py
InvalidTreeError
#
Bases: ValueError
Raised when a tree does not pass all of the validation
Source code in src/input4mips_validation/validation/exceptions.py
__init__(root, error_container)
#
Initialise the error
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path | str
|
The root of the tree we tried to validate |
required |
error_container
|
list[tuple[str, Exception]]
|
The thing which was being done and the error which was caught while validating the file. |
required |
Source code in src/input4mips_validation/validation/exceptions.py
MissingAttributeError
#
Bases: KeyError
Raised to signal that an attribute is missing
Obviously, this is only raised when the attribute should be there, but isn't.