undr.exception
#
Custom runtime exceptions.
Direct calls to Exception
in other parts of the codebase indicate a logic error.
Overview#
Module Contents#
- exception undr.exception.HashMismatch(path_id: pathlib.PurePosixPath, expected_hash: str, hash: str)#
Bases:
Exception
Raised if the hash read from the index is different from the hash calculated from the file bytes.
- Parameters:
path_id (pathlib.PurePosixPath) – The path ID of the resource with a hash mismatch.
expected_hash (str) – The hash read from the index.
hash (str) – The hash calculated from the bytes effectively processed.
- exception undr.exception.SizeMismatch(path_id: pathlib.PurePosixPath, expected_size: int, size: int)#
Bases:
Exception
Raised if the size read from the index is different from number of bytes in the decompressed file.
- Parameters:
path_id (pathlib.PurePosixPath) – The path ID of the resource with a size mismatch.
expected_size (int) – The size read from the index.
size (int) – The effective decompressed size in bytes.