Coverage for src/polystore/exceptions.py: 100%
20 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-03 06:58 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-03 06:58 +0000
1"""
2Exceptions for polystore.
4This module defines exceptions for storage operations and backend management.
5"""
8class StorageError(Exception):
9 """Base exception for storage operations."""
10 pass
13class StorageResolutionError(StorageError):
14 """Raised when a storage key cannot be resolved to a valid path."""
15 pass
18class BackendNotFoundError(StorageError):
19 """Raised when a backend is not found in the registry."""
20 pass
23class UnsupportedFormatError(StorageError):
24 """Raised when a file format is not supported."""
25 pass
28class ImageLoadError(RuntimeError):
29 """Raised when image loading fails."""
30 pass
33class ImageSaveError(RuntimeError):
34 """Raised when image saving fails."""
35 pass
38class StorageWriteError(RuntimeError):
39 """Raised when writing to storage fails."""
40 pass
43class MetadataNotFoundError(ValueError):
44 """Raised when required metadata files cannot be found."""
45 pass
48class PathMismatchError(ValueError):
49 """Raised when a path scheme doesn't match the expected scheme for a backend."""
50 pass
53class VFSTypeError(TypeError):
54 """Raised when a type error occurs in the VFS boundary."""
55 pass